From 97e4eec5be51ff74703159df4360411c4d40fa0a Mon Sep 17 00:00:00 2001 From: muebau Date: Sun, 26 May 2024 21:00:13 +0200 Subject: [PATCH] avoid exceptions to stay compatible with ESP8266 add limitaion information to readme --- usermods/TetrisAI_v2/gridbw.h | 2 +- usermods/TetrisAI_v2/readme.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/usermods/TetrisAI_v2/gridbw.h b/usermods/TetrisAI_v2/gridbw.h index 1b90150b7..6e4966f38 100644 --- a/usermods/TetrisAI_v2/gridbw.h +++ b/usermods/TetrisAI_v2/gridbw.h @@ -34,7 +34,7 @@ public: { if (width > 32) { - throw std::invalid_argument("maximal width is 32"); + this->width = 32; } } diff --git a/usermods/TetrisAI_v2/readme.md b/usermods/TetrisAI_v2/readme.md index d702a0459..57febdf11 100644 --- a/usermods/TetrisAI_v2/readme.md +++ b/usermods/TetrisAI_v2/readme.md @@ -30,4 +30,7 @@ It is best to set the background color to black 🖤, the border color to light ## Best results - If the speed is set to be a little bit faster than a good human could play with maximal intelligence and very few mistakes it makes people furious/happy at a party 😉. \ No newline at end of file + If the speed is set to be a little bit faster than a good human could play with maximal intelligence and very few mistakes it makes people furious/happy at a party 😉. + +## Limits +The game grid is limited to a maximum width of 32 and a maximum height of 255 due to the internal structure of the code. \ No newline at end of file