Simulator Test Descriptions

STEAL State: PlaceFlag

Normal Placement

Flags are placed in default locations.

Connections are in the PlaceFlag state
Red is on the left side of the field, blue is on the right
  1. Red sends placeFlag (125.0,125.0), simulator replies ok
  2. Blue sends placeFlag (375.0,125.0), simulator replies ok
Both connections are open

Unplaced Flag

If a team's flag has not been placed, the other team should still be able to poll for the current game state; the game time will just be 0.

Red is on the left side of the field, blue is on the right
Connections are in the PlaceFlag state
  1. Red sends placeFlag (125.0,125.0), simulator replies ok
  2. Red sends getState
  3. Simulator sends State response - game time is 0ms
  4. Red waits .25s
  5. Red sends getState
  6. Simulator sends State response - game time is 0ms
Both connections are open

Left Edge of the Field

Flags may not be placed within 1m of the edge of the field.

Connections are in the PlaceFlag state
Red is on the left side of the field, blue is on the right
  1. Red places a flag at (.99,120)
Simulator has sent an error message to, and closed, both connections

Bottom Edge of the Field

Flags may not be placed within 1m of the edge of the field.

Connections are in the PlaceFlags state
Red is on the left side of the field, blue is on the right
  1. Red places a flag at (100,1.01)
  2. Simulator responds ok
  3. Blue places a flag at (320,.99)
Simulator has sent an error message to, and closed, both connections

Top Edge of the Field

Flags may not be placed within 1m of the edge of the field.

Connections are in the PlaceFlags state
Red is on the left side of the field, blue is on the right
  1. Blue places a flag at (400,248.99)
  2. Simulator responds ok
  3. Red places a flag at (120,249.01)
Simulator has sent an error message to, and closed, both connections

Right Edge of the Field

Flags may not be placed within 1m of the edge of the field.

Connections are in the PlaceFlags state
Red is on the left side of the field, blue is on the right
  1. Blue places a flag at (499.01,120)
Simulator has sent an error message to, and closed, both connections

Centre Line

Flags may not be placed within 1m of the centre line.

Connections are in the PlaceFlags state
Red is on the left side of the field, blue is on the right
  1. Red places a flag at (248.99,100)
  2. Simulator responds ok
  3. Blue places a flag at (250.99,100)
Simulator has sent an error message to, and closed, both connections

Flag-Player Distance

Flags may not be placed within 25m of a player's starting position.

Connections are in the PlaceFlags state
Red is on the left side of the field, blue is on the right
  1. Red places a flag at (222.923,145)
  2. Simulator responds ok
  3. Blue places a flag at (277.097,145)
Simulator has sent an error message to, and closed, both connections

Flags on Enemy Side

A team may not place a flag on the opposing side of the field.

Connections are in the PlaceFlags state
Red is on the left side of the field, blue is on the right
  1. Blue places a flag at (400,100)
  2. Simulator responds ok
  3. Red places a flag at (400,200)
Simulator has sent an error message to, and closed, both connections

Jail

A team may not place a flag within 1m of a jail.

Connections are in the PlaceFlags state
Red is on the left side of the field, blue is on the right
  1. Red places a flag at (26.01,10)
  2. Simulator responds ok
  3. Blue places a flag at (474.01,10)
Simulator has sent an error message to, and closed, both connections