Introduction

This tutorial will teach you how to write a game module for SGN.

todo

The concept

We would like to create a very simple trivial question game.

The game factory

todo

public class TriviaInterface extends GameFactory {

   public TriviaInterface() {
      super("Trivia", new Version(1, 0), "One question trivia.", "Firstname Lastname");
   }

   public GamePlayerClient createGamePlayerClient(ClientEngine clientEngine) {
      return new TriviaPlayerClient(clientEngine);
   }

   public GameServer createGameServer(ServerEngine serverEngine) {
      return new TriviaServer(serverEngine);
   }

   public GameSettings createDefaultGameSettings() {
      return new MultiPlayerGameSettings();
   }

}