View Javadoc

1   package net.sourceforge.simplegamenet.connectaline;
2   
3   import net.sourceforge.simplegamenet.specs.model.ClientEngine;
4   import net.sourceforge.simplegamenet.specs.model.GameFactory;
5   import net.sourceforge.simplegamenet.specs.model.GamePlayerClient;
6   import net.sourceforge.simplegamenet.specs.model.GameServer;
7   import net.sourceforge.simplegamenet.specs.model.ServerEngine;
8   import net.sourceforge.simplegamenet.specs.to.GameSettings;
9   import net.sourceforge.simplegamenet.specs.to.Version;
10  
11  public class CALFactory extends GameFactory {
12  
13      public CALFactory() {
14          super("Connect a line", new Version(1, 0, 0), "A turn based game of which the purpose "
15                  + "is to make the first horizontal, vertical or diagonal line.\n"
16                  + "The game can be played with 2, 3, 4 or even more players.\n"
17                  + "The game can be played in 2 play styles: gravity and no gravity.\n\n"
18                  + "In the gravity play style a player can only take the lowest empty spot of a "
19                  + "column, while in the no gravity play style the player can take any empty "
20                  + "spot.",
21                  "Frederik Cocquyt");
22      }
23  
24      public GameServer createGameServer(ServerEngine serverEngine) {
25          return new CALServer(serverEngine);
26      }
27  
28      public GamePlayerClient createGamePlayerClient(ClientEngine clientEngine) {
29          return new CALPlayerClient(clientEngine);
30      }
31  
32      public GameSettings createDefaultGameSettings() {
33          return new CALSettings();
34      }
35  
36  }