示例#1
0
文件: Form3.cs 项目: tenghisu/Wumpus
        private void button2_Click(object sender, EventArgs e)
        {
            Wumpus wump = new Wumpus();

            wump.wumpusWakesUp(2, true);
            String wumpusWakesUp = wump.getWumpusState();

            textBox1.Text = wumpusWakesUp;
        }
示例#2
0
文件: Map.cs 项目: tenghisu/Wumpus
        public int wumpusLocation()
        {
            Wumpus      wumpus         = new Wumpus();
            int         wumpusPosition = wumpus.getWumpusPosition();
            WumpusState state          = wumpus.getWumpusState();
            int         movement       = 0;

            if (state == "asleep")
            {
                movement = 0;
            }
            else
            {
                movement = 1;
            }
            return(roomNumberWumpus + movement);
            // given the wumpus state I can make the wumpus move to a whole new room number
        }
示例#3
0
 public String getWumpusState()
 {
     return(wumpus.getWumpusState().ToString().ToLower());
 }