A space war

played in SQL.

Every player is a PostgreSQL role. Buy ships with INSERT, steer them with a function call, read the battle in a view. Write PL/pgSQL and the database flies your fleet for you. Or click the map, and read the query it wrote.

SELECT attack(ship_in_range_of, id) FROM ships_in_range;

DC19UPDATE my_ships SET action = 'MINE', action_target_id = planet;

DC19SELECT repair(id, id) FROM my_ships WHERE current_health < max_health;

DC19psql -h schemaverse.com -U <you> schemaverse