TTurnvector
AI coding workspace

Turn legality

A rejected move should leave no trace on the board. Turnvector is a Windows coding workspace for working through turn rules with a compatible model and reviewing the state changes those rules permit.

● ● ●Turnvector●
A concrete starting point · Turn legality ×
if (game.finished || player !== game.turn) return game;
if (!insideBoard(cell) || game.board[cell] !== null) return game;
return applyLegalMove(game, cell);
✳Add a legal-move check to a turn-based board game.
✓ ChangesReview before applying ↗
Illustrative workspace
Connection
Base URL, credentials and a reachable server.
Project
Try an occupied square, a move by the wrong player and a move after the game has ended, preserving the board on every rejection.
Review before applying
Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
Workflows

Turn legality

Workflows ↗
A concrete starting point
if (game.finished || player !== game.turn) return game;
if (!insideBoard(cell) || game.board[cell] !== null) return game;
return applyLegalMove(game, cell);
AI coding workspace

Your next change starts here.

Get the Windows app ↗