Practice 💪 your Salesforce Platform skills by implementing move and shoot algorithms for your tank.
Win a league and become a champion 🏆.
The concept is taken from a popular Robocode game.
Get familiar with many Salesforce Platform Apex capabilities via playing the game with other Trailblazers (kudo to Trailhead).
- The battle happens on a field (e.g. a square 10x10)
- At the beginning, tanks are placed randomly onto the field
- On every round 2 things happen:
- tanks move
- tanks attack other tanks
- Tanks with no lifes left are removed from the field
- The winner is the only tank left after the last round
Tanks notify engine about their desired move via ApexTankBase.cls#nextMoveDirection method.
Tanks can make 5 decisions for the next round move:
- UP
- RIGHT
- DOWN
- LEFT
- NOMOVE
Tanks movements happen during every round move phase:
- Engine iterates over alive tanks in random order
- Tank is moved in the chosen direction
- The move fails and the tank remains in the current location:
- if there is another tank in the target field already
- if there is no field in the target direction
Every tank has access to Radar to implement its move tactics:
Point coordinateFor(ApexTank tank);
Boolean pathExists(Point relativePoint, MoveDirectionEnum direction);
Tanks notify engine via ApexTankBase.cls#pointToAttack method about their attack coordinate for the next round.
Radar methods allow to implement attack strategy:
List<Point> getCoordinatesWithTanks();
ApexTank tankAt(Point point);
Take a look at CONTRIBUTING.md or raise an issue in this repository.
Leagues will be focusing on different aspects of the platform
- Apex League
basic apex knowledge(loops, variables, data structures) - Limits
consume the smallest amount of the platform resources - Teams
communicate between tanks to win as a team - Flows
implement move tactics or shoot strategy via flows - ...
Use Digital Experience, Reporting, Guest Profile, Contact, Opportunity, etc. platform capabilities to build leaderboard where everyone can see the results.
Implement custom UI via visualforce page or lwc to replay battles visually.