Developing TicToe HTML5/Implementing Server Entities: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
layout
imported>Hendrik Brummermann
Line 95: Line 95:
== Gameboard class ==
== Gameboard class ==


The game board class is rather simple for now. It is a specialisation of the Entity class both in the Java world as in the Marauroa type definition. It does not define any additional attributes for now.
{{TODO|Write this section}}

<source lang="java">
package net.sf.arianne.tictoe.server.entity;

import marauroa.common.game.RPClass;
import marauroa.common.game.RPObject;

/**
* a game board
*
* @author hendrik
*/
public class Gameboard extends Entity {
/**
* creates a new Gameboard.
*/
public Gameboard() {
// default constructor
}

/**
* creates a new Gameboard based on the provided RPObject
*
* @param object RPObject
*/
public Gameboard(RPObject object) {
super(object);
}

/**
* generates the RPClass
*/
public static void generateRPClass() {
RPClass clazz = new RPClass("gameboard");
clazz.isA("entity");
}
}
</source>

This is the place where we will implement most of the game logic later.


== Token class ==
== Token class ==