Example #1
0
 public GameState(Player p1, Player p2, float health, List<Platform> platforms, Goal goal)
 {
     this.p1 = p1;
     this.p2 = p2;
     this.health = health;
     this.platforms = platforms;
     this.goal = goal;
 }
Example #2
0
 public Stage(Goal goal, List<Platform> platforms)
 {
     Goal = goal;
     Platforms = platforms;
 }
Example #3
0
 public GameState Clone(
     Player p1 = null,
     Player p2 = null,
     float health = float.NegativeInfinity,
     PlayStatus status = null,
     List<Platform> platforms = null,
     Goal goal = null
 )
 {
     return new GameState(
         p1: p1 == null ? this.p1 : p1,
         p2: p2 == null ? this.p2 : p2,
         health: health == float.NegativeInfinity ? this.Health : health,
         platforms: platforms == null ? this.platforms : platforms,
         goal: goal == null ? this.goal : goal
     );
 }