Skip to content

Commit

Permalink
add new games, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Aug 28, 2023
1 parent 5d27000 commit eb393f2
Show file tree
Hide file tree
Showing 87 changed files with 4,620 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Apps contains changes needed to compile them on latest firmware, fixes has been

The Flipper and its community wouldn't be as rich as it is without your contributions and support. Thank you for all you have done.

### Apps checked & updated at `23 Aug 19:40 GMT +3`
### Apps checked & updated at `28 Aug 06:05 GMT +3`


# Default pack
Expand Down Expand Up @@ -142,6 +142,8 @@ The Flipper and its community wouldn't be as rich as it is without your contribu
| Yatzee | ![Games Badge] | [by emfleak](https://github.com/emfleak/flipperzero-yatzee) | | [![UFW Badge]](https://lab.flipper.net/apps/yatzee) |
| Secret Toggle | ![Games Badge] | [by nostrumuva](https://github.com/nostrumuva/secret_toggle) | | [![Author Badge]](https://lab.flipper.net/apps/secret_toggle) |
| Sudoku Game | ![Games Badge] | [by profelis](https://github.com/profelis/fz-sudoku) | | [![Author Badge]](https://lab.flipper.net/apps/sudoku) |
| Ultimate Tic-Tac-Toe | ![Games Badge] | [by Racso](https://github.com/Racso/fzero-apps/tree/main) | | [![Author Badge]](https://lab.flipper.net/apps/racso_ultimate_tic_tac_toe) |
| Zero! | ![Games Badge] | [by Racso](https://github.com/Racso/fzero-apps/tree/main) | | [![Author Badge]](https://lab.flipper.net/apps/racso_zero) |
| Air Mouse | ![GPIO Badge] | [by ginkage](https://github.com/ginkage/FlippAirMouse/) | | [![Author Badge]](https://lab.flipper.net/apps/air_mouse) |
| Plantower PMSx003 sensor reader | ![GPIO Badge] | [by 3cky](https://github.com/3cky/flipperzero-airmon) | | [![UFW Badge]](https://lab.flipper.net/apps/airmon) |
| Bar code scanner emulator via COM port | ![GPIO Badge] | [by polarikus](https://github.com/polarikus/flipper-zero_bc_scanner_emulator) | | ![None Badge] |
Expand Down
4 changes: 4 additions & 0 deletions non_catalog_apps/ultimate_tic_tac_toe/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/*
.vscode
.clang-format
.editorconfig
674 changes: 674 additions & 0 deletions non_catalog_apps/ultimate_tic_tac_toe/LICENSE

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions non_catalog_apps/ultimate_tic_tac_toe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## About Ultimate Tic-Tac-Toe

Ultimate Tic-Tac-Toe is a strategic variant of Tic-Tac-Toe where you have 9 Tic-Tac-Toe boards arranged in a 3x3 grid. The aim of the game is to win more small boards (3x3) to ultimately win the large board (3x3 of Boards).

## Rules:

1. The first player can place their piece anywhere on the large board.
2. Your move determines the board where your opponent will make their next move. For example, if you place your piece in the top-right corner of a small board, your opponent must play in the top-right board. If your opponent then places their piece in the bottom-left corner of that board, you must now play in the bottom-left board.
3. Small boards follow the same rules as regular Tic-Tac-Toe. You must get 3 in a row to win the small board.
4. If your opponent sends you to a board that's already been won, you can choose any open spot on the entire board for your next move.
5. The winner is the first player to win 3 small boards in a row, either horizontally, vertically or diagonally.
6. If all 9 small boards are filled and no player has won 3 small boards in a row, the game is a draw.

## App features

- Play against a friend or against the computer, or watch the computer play against itself.
- Choose between 5 difficulty levels for the computer, from an easy random move generator to a hard minimax algorithm.

## Upcoming features

- Player statistics
- Harder AI

## Credits
Made with ♠ by Racso - [https://games.by.rac.so/fzero](https://games.by.rac.so/fzero)
16 changes: 16 additions & 0 deletions non_catalog_apps/ultimate_tic_tac_toe/application.fam
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
App(
appid="racso_ultimate_tic_tac_toe",
name="Ultimate Tic-Tac-Toe",
apptype=FlipperAppType.EXTERNAL,
entry_point="app_main",
requires=["gui"],
stack_size=8*1024,
order=50,
fap_description="Ultimate Tic-Tac-Toe: play on a big board, where each square is a Tic-Tac-Toe board itself!",
fap_category="Games",
fap_version="1.0",
fap_author="Racso",
fap_weburl="https://games.by.rac.so/flipper-zero",
fap_icon="ultimate_tic_tac_toe.png",
fap_icon_assets="images"
)
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions non_catalog_apps/ultimate_tic_tac_toe/release/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## v1.0

- Initial release.
- Game is fully playable.
- Players or AI can play on both sides.
- 5 difficulty levels for the computer available (based on random and minimax algorithms).
86 changes: 86 additions & 0 deletions non_catalog_apps/ultimate_tic_tac_toe/scripts/app.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
Ultimate Tic-Tac-Toe. By Racso.
https://rac.so
Licensed under the GNU General Public License v3.0: https://www.gnu.org/licenses/gpl-3.0.en.html
Copyright (C) 2023 Óscar F. Gómez
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*/

#include "app.h"
#include "app_gameplay.h"
#include "scene_menu.h"
#include "scene_game.h"
#include "scene_credits.h"
#include "scene_management.h"

#include <dolphin/dolphin.h>
#include <notification/notification.h>
#include <notification/notification_messages.h>

AppContext* app_alloc() {
AppContext* app = malloc(sizeof(AppContext));
app->gameplay = gameplay_alloc();

app->gui = furi_record_open(RECORD_GUI);

app->sceneManager = scene_manager_alloc();
scene_manager_attach_to_gui(app->sceneManager, app->gui);
scene_manager_register_scene(
app->sceneManager,
SceneType_Menu,
scene_alloc(menu_render_callback, NULL, menu_input_callback, NULL, app));
scene_manager_register_scene(
app->sceneManager,
SceneType_Credits,
scene_alloc(credits_render_callback, NULL, credits_input_callback, NULL, app));
scene_manager_register_scene(
app->sceneManager,
SceneType_Game,
scene_alloc(
game_render_callback,
game_tick_callback,
game_handle_input,
game_transition_callback,
app));
return app;
}

void app_free(AppContext* app) {
scene_manager_detach_from_gui(app->sceneManager, app->gui);
scene_manager_free(app->sceneManager);
furi_record_close(RECORD_GUI);
gameplay_free(app->gameplay);
free(app);
}

int32_t app_main(void* p) {
UNUSED(p);

dolphin_deed(DolphinDeedPluginGameStart);

NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
notification_message_block(notification, &sequence_display_backlight_enforce_on);

AppContext* app = app_alloc();

scene_manager_set_scene(app->sceneManager, SceneType_Menu);

while(scene_manager_has_scene(app->sceneManager)) {
scene_manager_tick(app->sceneManager);
furi_delay_ms(100);
}

app_free(app);

notification_message(notification, &sequence_display_backlight_enforce_auto);
furi_record_close(RECORD_NOTIFICATION);

return 0;
}
33 changes: 33 additions & 0 deletions non_catalog_apps/ultimate_tic_tac_toe/scripts/app.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
Ultimate Tic-Tac-Toe. By Racso.
https://rac.so
Licensed under the GNU General Public License v3.0: https://www.gnu.org/licenses/gpl-3.0.en.html
Copyright (C) 2023 Óscar F. Gómez
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*/

#include <gui/gui.h>

typedef struct SceneManager SceneManager;
typedef struct AppGameplayState AppGameplayState;

typedef struct AppContext {
Gui* gui;
SceneManager* sceneManager;
AppGameplayState* gameplay;

} AppContext;

typedef enum SceneType {
SceneType_None,
SceneType_Menu,
SceneType_Game,
SceneType_Credits,
} SceneType;
Loading

0 comments on commit eb393f2

Please sign in to comment.