#	PUB Demo
#
#	This file demonstrates a few simple objects.
#

from pubcore import *		# import core datatypes, functions, & constants
import pubobjs				# import standard object library
import pub					# import global variables
import gadgets				# import wierd & wonderful things
import pubtcp			# network handling
import time

import rftg

# create shortcuts for most common object types
Room = pubobjs.Room
Exit = pubobjs.Exit
Thing = pubobjs.Thing
NPC = pubobjs.NPC

pub.scheduler = Scheduler("12:00")		# start the clock!

#----------------------------------------------------------------------
#	Create some objects
#

#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
square = Room("Game Room")
square.desc = 'This is where the game is played.'

pub.player = NPC('The Dealer')	# put net player here
Andy = pubtcp.NetPlayer("Andy")
Andy.password = '.'
Beth = pubtcp.NetPlayer("Beth")
Beth.password = '.'
Chad = pubtcp.NetPlayer("Chad")
Chad.password = '.'

draw = rftg.CardGroup("Draw Pile,drp")
discard = rftg.CardGroup("Discard Pile,dip")
rh = rftg.Card("Rebel Homeworld,rh")
rb = rftg.Card("Rebel Base,rb")
draw.ContainNoCheck(rh);
draw.ContainNoCheck(rb);
Andy.CanSee(

#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
log = Room("Login Room")
log.desc = "Only players in the process of loggin in appear here."

#----------------------------------------------------------------------
#	Run the game
#

while pubtcp.running >= 0:
	time.sleep(0.3)
	pub.scheduler.Update()
	pubtcp.NetUpdate()

pubtcp.ShutDown()
