Agar.io is a massively multiplayer online action game created by Brazilian developer Matheus Valadares. Players control one or more circular cells in a map representing a Petri dish. The goal is to gain as much mass as possible by eating agar and cells smaller than the player's cell while avoiding larger ones which can eat the player's cells. Each player starts with one cell , but players can split a cell into two once it reaches a sufficient mass, allowing them to control multiple cells. The name comes from the substance agar, used to culture bacteria.
private List<Entity> GetAllEntities()
{
List<Entity> allEntities = new List<Entity>();
allEntities.AddRange(_players);
allEntities.AddRange(_food);
return allEntities;
}
private void SpawnFood()
{
for (var i = 0; i < FoodCount; i++)
{
Food food = new Food(GetRandomPosition());
_food.Add(food);
Board.AddEntityToBoard(food);
}
}
public Player AddPlayer()
{
Player player = new Player(GetRandomPosition());
_players.Add(player);
Board.AddEntityToBoard(player);
return player;
}
To get started...
- 🍴 Fork this repo!
- HACK AWAY! 🔨🔨🔨
- MIT license
- Copyright 2021 © Sierra.