Example #1
0
        public static string Visit(Player p, RedRoom r, ref bool isPlayerInRoom, List <Figure> figureList)
        {
            dynamic x = r;

            LeaveOrEnterRoom(x, ref isPlayerInRoom);
            return("");
        }
Example #2
0
 private static void LeaveOrEnterRoom(RedRoom room, ref bool isPlayerInRoom)
 {
     if (isPlayerInRoom == false)
     {
         room.enterPlayer();
         isPlayerInRoom = true;
     }
     else
     {
         room.leavePlayer();
         isPlayerInRoom = false;
     }
 }