caboume
This commit is contained in:
parent
c294c61a85
commit
8be4907c25
1 changed files with 40 additions and 33 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
package com.epita.creeps;
|
package com.epita.creeps;
|
||||||
|
|
||||||
import com.epita.creeps.commands.Basics;
|
import com.epita.creeps.commands.Basics;
|
||||||
|
import com.epita.creeps.given.extra.Cartographer;
|
||||||
import com.epita.creeps.given.vo.geometry.Direction;
|
import com.epita.creeps.given.vo.geometry.Direction;
|
||||||
import com.epita.creeps.given.vo.geometry.Point;
|
import com.epita.creeps.given.vo.geometry.Point;
|
||||||
import com.epita.creeps.given.vo.response.CommandResponse;
|
import com.epita.creeps.given.vo.response.CommandResponse;
|
||||||
|
|
@ -73,26 +74,31 @@ public class Program {
|
||||||
Unit.getUnits().add(citizen1);
|
Unit.getUnits().add(citizen1);
|
||||||
Unit.getUnits().add(citizen2);
|
Unit.getUnits().add(citizen2);
|
||||||
|
|
||||||
StatisticsResponse statistics = Basics.getStatistics();
|
// StatisticsResponse statistics = Basics.getStatistics();
|
||||||
logger.debug(statistics.toString());
|
// logger.debug(statistics.toString());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Gossip
|
// Gossip
|
||||||
// while (true) {
|
// for (int i = 0; i < 60; i++) {
|
||||||
// for (var player : statistics.players) {
|
//// for (var player : statistics.players) {
|
||||||
// if (player.name == login)
|
// StatisticsResponse statistics = Basics.getStatistics();
|
||||||
|
//
|
||||||
|
// var player = statistics.players.getFirst();
|
||||||
|
// if (player.name == login) {
|
||||||
|
// i--;
|
||||||
// continue;
|
// continue;
|
||||||
|
// }
|
||||||
// citizen1.sendMessage(player.name, "Nicole");
|
// citizen1.sendMessage(player.name, "Nicole");
|
||||||
// citizen2.sendMessage(player.name,"Ouvre");
|
// citizen2.sendMessage(player.name,"Ouvre");
|
||||||
// citizen1.sendMessage(player.name, "Nicole");
|
// citizen1.sendMessage(player.name, "Nicole");
|
||||||
// citizen2.sendMessage(player.name, "MAIS MOI JE VEUX FAIRE L'AMOUUUUR");
|
// citizen2.sendMessage(player.name, "MAIS MOI JE VEUX FAIRE L'AMOUUUUR");
|
||||||
// }
|
//// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// timoutheou
|
// // timoutheou
|
||||||
// while (true) {
|
// for (int i = 0; i < 2; i++) {
|
||||||
// for (var player : statistics.players) {
|
// for (var player : statistics.players) {
|
||||||
// if (player.name == login || !player.name.contains("battefort"))
|
// if (player.name == login || !player.name.contains("battefort"))
|
||||||
// continue;
|
// continue;
|
||||||
|
|
@ -105,49 +111,50 @@ public class Program {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
citizen2.sendMessage("Hector", "Nique ta mère Hector").waitFinished();
|
// Negotiator
|
||||||
|
// citizen2.sendMessage("Hector", "Nique ta mère Hector").waitFinished();
|
||||||
|
|
||||||
// Kaboom & epic fail
|
// Kaboom & epic fail
|
||||||
citizen1.spawn("bomber-bot").waitFinished();
|
citizen1.spawn("bomber-bot").waitFinished();
|
||||||
List<Unit> bomberos = BomberBot.getBomberBotUnits();
|
List<Unit> bomberos = BomberBot.getBomberBotUnits();
|
||||||
BomberBot bomberau = (BomberBot) bomberos.getFirst();
|
BomberBot bomberau = (BomberBot) bomberos.getFirst();
|
||||||
|
|
||||||
bomberau.upgrade();
|
// bomberau.upgrade();
|
||||||
// bomberau.fire();
|
bomberau.fire();
|
||||||
|
|
||||||
// =======================================================
|
// =======================================================
|
||||||
// Stormtrooper
|
// Stormtrooper
|
||||||
citizen1.spawn("turret").waitFinished();
|
// citizen1.spawn("turret").waitFinished();
|
||||||
List<Unit> tourelles = Turret.getTurretUnits();
|
// List<Unit> tourelles = Turret.getTurretUnits();
|
||||||
Turret unerelle = (Turret) tourelles.getFirst();
|
// Turret unerelle = (Turret) tourelles.getFirst();
|
||||||
for (int i = 0; i < 101; i++) {
|
// for (int i = 0; i < 101; i++) {
|
||||||
unerelle.fire(unerelle.getPosition().plus(new Point(0, 1)));
|
// unerelle.fire(unerelle.getPosition().plus(new Point(0, 1)));
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Gather resources
|
// Gather resources
|
||||||
while (true) {
|
|
||||||
citizen1.move(Direction.RIGHT);
|
|
||||||
citizen2.move(Direction.LEFT);
|
|
||||||
citizen1.gather();
|
|
||||||
citizen2.gather();
|
|
||||||
citizen1.move(Direction.UP);
|
|
||||||
citizen2.move(Direction.DOWN);
|
|
||||||
citizen1.gather();
|
|
||||||
citizen2.gather();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Country roads
|
|
||||||
// while (true) {
|
// while (true) {
|
||||||
// citizen1.move(Direction.RIGHT);
|
// citizen1.move(Direction.RIGHT);
|
||||||
// citizen2.move(Direction.LEFT);
|
// citizen2.move(Direction.LEFT);
|
||||||
// citizen1.build(Building.ROAD);
|
// citizen1.gather();
|
||||||
// citizen2.build(Building.ROAD);
|
// citizen2.gather();
|
||||||
// citizen1.move(Direction.UP);
|
// citizen1.move(Direction.UP);
|
||||||
// citizen2.move(Direction.DOWN);
|
// citizen2.move(Direction.DOWN);
|
||||||
// citizen1.build(Building.ROAD);
|
// citizen1.gather();
|
||||||
// citizen2.build(Building.ROAD);
|
// citizen2.gather();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// Country roads
|
||||||
|
while (true) {
|
||||||
|
citizen1.move(Direction.RIGHT);
|
||||||
|
citizen2.move(Direction.LEFT);
|
||||||
|
citizen1.build(Building.ROAD);
|
||||||
|
citizen2.build(Building.ROAD);
|
||||||
|
citizen1.move(Direction.UP);
|
||||||
|
citizen2.move(Direction.DOWN);
|
||||||
|
citizen1.build(Building.ROAD);
|
||||||
|
citizen2.build(Building.ROAD);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue