smeef-card-contest.zip

snippets · 2.5 KB · 2010-03-30

Smeef card contest entry: Blackjack and Deck for MUDPyE (Python).

Download   « Back to the snippets list

INSTALLATION.txt

Inside of Mudlib\Avatars\avatar_parse.py:

	add this as the first line after the comment: import Blackjack

	add to the end of the _Sys_Create function the following line:
	self.blackjack = Blackjack.Blackjack()

Inside of Mudlib\Commandlibs\commandlib_user.py:

	add this as the next import statement: import Blackjack

	add this to exportCommands, which is at the bottom of the file:
	(1, "blackjack", "%raw_text", COMMANDMODE_WORD, False, IC_blackjack, {})


	add this function somewhere, say, right before expertCommands:
	
	def IC_blackjack(avatar, command, args):
	    avatar.blackjack.makeMove(args[0])
	    avatar.Send(avatar.blackjack.getStatus())
	    return True
  
Other than that, just put Blackjack.py and Deck.py in the main directory,
where you run mud or mud.bat, from the mudpye-v0.06b.tar.gz mud

Archive contents (3 files)

FileSize
INSTALLATION.txt837 B
Blackjack.py4.1 KB
Deck.py3.2 KB

Site Stats

Snippets: 1791
Codebases: 571