/game-works

Primary LanguageTypeScriptThe UnlicenseUnlicense

Game Works

Introduction

Welcome to my React/Redux Learning Project! The primary aim of this project is to facilitate my learning journey with React and Redux, two powerful tools in the world of web development. Additionally, this repository serves as a compilation of handy tools for various games I enjoy. Through this project, I hope to not only strengthen my understanding of React and Redux but also create a suite of utilities that can enhance the gaming experience for myself and other enthusiasts.

Project Overview

At its core, this project is designed as a learning sandbox where I experiment with React's dynamic UI capabilities and Redux's state management prowess. By building practical tools for games, I aim to tackle real-world scenarios, thereby solidifying my grasp of these technologies.

Square: A Puzzle Game Solver

One of the key components of this project is 'Square', a solver for a specific puzzle game that many find intriguing and challenging.

What is Square?

'Square' is a tool designed to solve puzzles from a particular game that involves a 3x3 grid. Each cell in this grid can be in one of two states, and the objective of the game is to flip all cells to the "good" state. The twist in the game is that every time you click a cell, it and its orthogonal neighbors flip to their alternate states.

Functionality

The 'Square' tool provides a smart solver for this puzzle game. It takes the current state of the 3x3 grid as input and computes the optimal series of moves (or flips) needed to reach the desired end state where all cells are in the "good" state. This solver is an excellent example of algorithmic problem-solving and showcases the application of Redux for state management in complex logic scenarios.

Technologies Used

  • React: For rendering the user interface and handling user interactions.
  • Redux: To manage the state of the game, especially the current state of the grid and the computation of moves.
  • TypeScript: For adding type safety to the project, enhancing code reliability and maintainability.
  • Additional tools/libraries used in the project (like Jest for testing, Ramda for functional utilities, etc.).

Certainly! Your perspective on the use of solvers in puzzle games, especially regarding the distinction between creating such tools and merely using them, is an important aspect to highlight. Here's an updated section that incorporates your specific views:

Ethical Considerations: The Use of Solvers in Puzzle Games

The Dual Role of Game Solvers

The creation and use of puzzle games solvers serve dual roles - educational enhancement and potential aids in gameplay.

As a Creator

  • Not Cheating for the Creator: I believe that using a solver I've created is not cheating, as long as it the game being played doesn't forbid use of tools, explicitly or implicitly. The process of creating such a tool involves deep understanding and engagement with the game’s mechanics, which is a rewarding challenge in itself.
  • A Source of Entertainment: For me, the act of creating a solver is often more engaging and entertaining than playing the puzzle itself. It's an exercise in problem-solving, programming, and algorithmic thinking.

As a User

  • Cheating in Single-Player Games: If you're using a solver without having developed it yourself, it can be considered cheating. However, in single-player games, the use of such tools is a personal choice. It is acceptable to use them to bypass parts of the game you find tedious or to enhance your personal gaming experience, as long as it doesn't diminish your enjoyment.
  • Fair Play in Multiplayer Settings: In multiplayer or competitive settings, the use of solvers should align with the game's rules and the spirit of fair play.

Future Enhancements

This project is an ongoing journey of learning and development, with many possibilities for future enhancements. Below are some of the ideas I'm considering, in no particular order:

Addressing Non-Serializable Values in Redux State

  • Currently, a class instance is being stored in the Redux state which is a non-serializable value. In the future, this will be refactored to store serializable objects instead, aligning with Redux best practices and ensuring compatibility with tools like Redux DevTools.

I'm learning, you know...

Internationalization and Localization (i18n and l10n)

  • Implementing support for multiple languages to make the app more accessible to a global audience.
  • Adding localization features to tailor the app to different cultural contexts.

UI/UX Improvements

  • Redesigning the interface to enhance visual appeal and user experience.
  • Implementing responsive design to ensure a seamless experience across various devices.
  • I'm not a designer so the goal here is "not make people's eyes bleed".

Battleship Game

  • Developing a Battleship game, which could include strategies for efficient guessing and tracking opponent moves.

Wordle Solver

  • Creating a solver for the popular word game Wordle, using algorithms to predict the best guesses based on previous inputs.

Sudoku Solver

  • Building a Sudoku puzzle solver, which could involve complex algorithms to handle various levels of puzzle difficulty.
  • Would probably start as a tool to help solve Sudoku puzzles, rather than actually solving them.

Enhancements to Square

  • Introducing additional rules for the Square game, such as varying the number of states a square can have and different grid sizes.
  • Modifying the flip mechanics to include different patterns or more complex interactions between squares.

Optimization of Square Solver

  • Improving the current Square solver algorithm to handle larger grids and more complex scenarios efficiently.
  • Exploring different algorithmic approaches or heuristics to enhance performance.

Utilization of AI in Development

Embracing AI in Coding

In this project, and in general, I have enthusiastically embraced the use of Artificial Intelligence, throughout the development process.