From 21cba727a04b7df9f9768f60cd33ba2fdf3221f7 Mon Sep 17 00:00:00 2001 From: Andrew Paon Date: Sun, 16 Apr 2023 19:26:24 -0700 Subject: [PATCH] clarify gridfield_place's return value --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index 856e448..dd4ae4f 100644 --- a/main.c +++ b/main.c @@ -154,6 +154,8 @@ GridField allowed_moves(GridField g, struct Piece p) { return allowed; } +// Returns a gridfield that with the piece added at the given coordinates. +// If the move is illegal, it returns the original field. GridField gridfield_place(GridField g, struct Piece p, int x, int y) { if ((x > 9 - p.width) || (y > 9 - p.height)) { // invalid location -- 2.45.2