megamek.server.victory
Class NoodleVictory

java.lang.Object
  extended by megamek.server.victory.NoodleVictory
All Implemented Interfaces:
java.io.Serializable, Victory

public class NoodleVictory
extends java.lang.Object
implements Victory, java.io.Serializable

detailed spaghetti from the old victory code this assumes game options do not change during game (atleast regarding victory conditions)

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface megamek.server.victory.Victory
Victory.Result
 
Field Summary
protected  Victory v
           
 
Constructor Summary
NoodleVictory()
           
 
Method Summary
protected  void construct(IGame game)
           
 Victory.Result victory(IGame game, java.util.HashMap<java.lang.String,java.lang.Object> ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

v

protected Victory v
Constructor Detail

NoodleVictory

public NoodleVictory()
Method Detail

construct

protected void construct(IGame game)

victory

public Victory.Result victory(IGame game,
                              java.util.HashMap<java.lang.String,java.lang.Object> ctx)
Specified by:
victory in interface Victory
Parameters:
game - - the game (state) we are playing
ctx - - a map Strings to simple serializable objects (preferably Integers , Strings ,Doubles etc) which are used to store state between executions if such feature is absolutely required.. as a key you should use something atleast class- specific to limit namespace collisions
Returns:
a result with true if victory occured, false if not must not return null MUST NOT modify game state!