https://github.com/pacna/simplemath
A basic interactive calculator that uses the Shunting-yard algorithm to evaluate mathematical expressions.
https://github.com/pacna/simplemath
csharp dotnet monogame
Last synced: 2 months ago
JSON representation
A basic interactive calculator that uses the Shunting-yard algorithm to evaluate mathematical expressions.
- Host: GitHub
- URL: https://github.com/pacna/simplemath
- Owner: pacna
- License: mit
- Created: 2020-08-08T02:41:56.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-11-19T03:55:33.000Z (over 1 year ago)
- Last Synced: 2025-04-12T19:42:46.586Z (over 1 year ago)
- Topics: csharp, dotnet, monogame
- Language: C#
- Homepage:
- Size: 184 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Math

Simple Math is a basic interactive calculator that uses the [Shunting-yard algorithm](https://en.wikipedia.org/wiki/Shunting-yard_algorithm) to evaluate mathematical expressions. The project is built using the MonoGame Framework and can be run in both in MonoGame app mode and a Terminal app mode.
### MonoGame app mode

### Terminal app mode
```bash
Pass in a math expression: 3 + 3
6
Press q and then ENTER to quit
Pass in a math expression: This should be invalid
Invalid input (ノ﹏ヽ)
Press q and then ENTER to quit
Pass in a math expression: q
Bye | (• ◡•)| (❍ᴥ❍ʋ)
```
## Ubuntu Prerequisites
Before you can build and run Simple Math, you need to have the following installed on your system:
1. [.Net Core SDK](https://dotnet.microsoft.com/download)
2. [Make](https://www.gnu.org/software/make/)
## Build and Run
To build and run the project in MonoGame app mode, run:
```bash
$ make
```
To build and run the project in Terminal app mode, run:
```bash
$ make OPT=terminal
```
## Running Tests
To run the test suite for Simple Math, use the following command:
```bash
$ make test
```