public static string Visit(Player p, RedRoom r, ref bool isPlayerInRoom, List <Figure> figureList) { dynamic x = r; LeaveOrEnterRoom(x, ref isPlayerInRoom); return(""); }
private static void LeaveOrEnterRoom(RedRoom room, ref bool isPlayerInRoom) { if (isPlayerInRoom == false) { room.enterPlayer(); isPlayerInRoom = true; } else { room.leavePlayer(); isPlayerInRoom = false; } }