def initialize(self, base_info, diff_data, game_setting): self.base_info = base_info self.diff_data = diff_data self.game_setting = game_setting # GameDataのインスタンスを生成 self.GameData = gd.GameData(self.base_info, self.diff_data, self.game_setting) self.agent = pr.Pumpkin_random(self.GameData) print("-----------------新しいゲーム-------------------") print("生存者: %s" % self.GameData.aliveAgent) print("自分の陣営:%s陣営" % self.GameData.myCamp) print("自分の役職:%s" % self.GameData.myRole) print("ゲームの設定:%s人人狼" % self.GameData.playerNum)
import cocos import GameData import Map import buildMenu cocos.director.director.init(width=800, height=600, autoscale=True, resizable=True) # Create the scenes map = Map.MainMap(None) game_data = GameData.GameData(10, 10, 10, 10, 10, 10, map) map.add_hex(Map.Hex(10, 7, GameData.tile_information['LaunchPad'])) #map.addBSS(building_select_layer, buildingSelect_scene) map_scene = cocos.scene.Scene(map) # And now, start the application, starting with main_scene cocos.director.director.run(map_scene) # or you could have written, without so many comments: # director.run( cocos.scene.Scene( HelloWorld() ) )
generated as pc.plotContours(pc.weekdayData, [.02,.25,.5,.75,.98]) ''' import numpy as np import scipy as sp import matplotlib.pyplot as plt import matplotlib.lines as mline import pylab as pl from scipy import stats import statistics as st import math, copy import GameData as gc # fill in with an appropriate GameData instance gameData = gc.GameData() def plotMeans (dataInterval='Daily', dataType='net-demand', showTitle=False): ''' Reduces the raw data into means and 1-sigma error bars, plots result ''' if gameData.dataType != dataType: gameData.reset(dataType) data = gameData.dataArray(dataInterval) d = [np.array(c) for c in data] print('Shape:', np.shape(d)) means = [c.mean() for c in d] stds = [c.std() for c in d] x = range(np.shape(d)[0]) if showTitle:
import GameData gamedata = GameData.GameData() while 1: hs = gamedata.getHabitats() print("You have " + str(gamedata.getHabitats()) + " habitats") print("You have " + str(gamedata.getHabitatMaterial()) + " Habitat Materal") hconsume = raw_input("How Much Habitat Material do you want to order?") gamedata.addHabitatMaterial(hconsume) tiles = raw_input("How many habitats do you want to create?") gamedata.makeHabitats(tiles) gamedata.produce()