diff --git a/source/main.cpp b/source/main.cpp index 14cf50b4aa5e62b7a45e05c07ee8a3427af46337..7a1cff4dfeb4c1b593e25d89690cae45964fef08 100755 --- a/source/main.cpp +++ b/source/main.cpp @@ -68,7 +68,7 @@ Game::Game(MicroBit& micro_bit) {} void Game::run() { - this->micro_bit.display.scroll("NEW GAME!"); + // this->micro_bit.display.scroll("NEW GAME!"); // init screen display mode, to be sure it is in a known-state // TODO: consider changing to greyscale to allow "mutli-coloured" blocks this->micro_bit.display.setDisplayMode(DISPLAY_MODE_BLACK_AND_WHITE); @@ -86,9 +86,9 @@ void Game::run() { &Game::press_button_b ); while (true) { // TODO: change to use game-over condition - this->draw(); // render screen buffer + // this->draw(); // render screen buffer // sleep to conserve CPU cycles and allow other fibers a chance to run - this->micro_bit.sleep(50); // a 50ms sleep gives us a 20Hz tick-rate + this->micro_bit.sleep(100); // a 100ms sleep gives us a 10Hz tick-rate } // TODO: add the rest of the game logic this->micro_bit.display.scroll("GAME OVER!"); @@ -117,12 +117,12 @@ void Game::draw() { void Game::press_button_a(MicroBitEvent e) { // XXX: debug - this->screen_buffer.setPixelValue(0, 2, 255); + this->micro_bit.display.print("A"); } void Game::press_button_b(MicroBitEvent e) { // XXX: debug - this->screen_buffer.setPixelValue(4, 2, 255); + this->micro_bit.display.print("B"); }