protomine/src/grid/shop.c

17 lines
473 B
C

#include "grid.h"
#include "player.h"
#include "tiles.h"
void
grid_shop(struct Grid *restrict grid, struct Player *restrict player)
{
const int x_middle = grid->width / 2;
const int y_middle = grid->height / 2;
grid_set(grid, x_middle - 2, y_middle, TILE_CONTRACTS_SPEED_UP);
grid_set(grid, x_middle + 2, y_middle, TILE_CONTRACTS_SLOW_DOWN);
grid_set(grid, grid->width - 3, grid->height - 3, TILE_ZONE_TRANSITION);
*player = player_init(x_middle, y_middle + 2);
}