File tree Expand file tree Collapse file tree
engine/src/main/battlecode Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,15 @@ public interface RobotController {
5353 */
5454 boolean isCooperation ();
5555
56+ /**
57+ * Returns the backstabbing team, or null if still in cooperation mode.
58+ *
59+ * @return the team that performed the backstab, or null if still in cooperation mode.
60+ *
61+ * @battlecode.doc.costlymethod
62+ */
63+ Team getBackstabbingTeam ();
64+
5665 // *********************************
5766 // ****** UNIT QUERY METHODS *******
5867 // *********************************
Original file line number Diff line number Diff line change @@ -405,6 +405,10 @@ public boolean isCooperation() {
405405 return this .isCooperation ;
406406 }
407407
408+ public Team getBackStabbingTeam (){
409+ return this .backstabber ;
410+ }
411+
408412 public int getRoundsSinceBackstab () {
409413 if (this .isCooperation ) {
410414 return 0 ;
Original file line number Diff line number Diff line change @@ -106,6 +106,11 @@ public boolean isCooperation() {
106106 return this .gameWorld .isCooperation ();
107107 }
108108
109+ @ Override
110+ public Team getBackstabbingTeam () {
111+ return this .gameWorld .getBackStabbingTeam ();
112+ }
113+
109114 // *********************************
110115 // ****** UNIT QUERY METHODS *******
111116 // *********************************
You can’t perform that action at this time.
0 commit comments