Skip to content

Commit

Permalink
docs: update README.md instructions and info
Browse files Browse the repository at this point in the history
Renamed the title of "Lua Triangle Calculator" to "Triangle Calculator"
and remove the college note about the instructions. The instructions
that previously didn't work now work thanks to the updated instructions
the error only occur when someone tried to call lua from the source
directory of the project.
  • Loading branch information
Robert-Walker0 committed Nov 12, 2024
1 parent 6c09764 commit 90f9f78
Showing 1 changed file with 35 additions and 11 deletions.
46 changes: 35 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Lua Triangle Calculator
# Triangle Calculator

## A triangle calculator translated from C++ to Lua
## A triangle calculator

This project was originally made in C++ by me in my time during college. It is a multiple file program that contains a version where you can use a triangle calculator in C++ or Lua. You should be able to use it with relative ease.

## Prerequisites

Before downloading this program you should have the following things installed depending on how you want to use this program
Before downloading this program you should have the following things installed depending on how you want to use this program.

* Lua 5.1 or higher
* C++14 or higher
* Lua 5.1 or higher

## Installation

1. Clone the repository:
```bash
git clone https://github.com/Robert-Walker0/Lua-Triangle-Calculator.git
git clone https://github.com/Robert-Walker0/Triangle-Calculator.git
```

2. Navigate to your project directory:
```bash
cd Lua-Triangle-Calculator
cd Triangle-Calculator
```

## Uninstalling
Expand All @@ -29,27 +29,51 @@ cd Lua-Triangle-Calculator

1. Delete the project directory:
```bash
rmdir "Lua-Triangle-Calculator" /s /q
rmdir "Triangle-Calculator" /s /q
```

### Linux

1. Delete the project directory:
```bash
rm -rf "Lua-Triangle-Calculator"
rm -rf "Triangle-Calculator"
```

## Usage

To use the triangle calculator, run the commands below and follow the prompts afterwards.

### Lua Version

To use the triangle calculator, run the command `lua src/lua/main.lua` file and follow the prompts to enter the side lengths.
#### Windows
```bash
cd .\src\lua
lua main.lua
```

#### Linux
```bash
cd src/lua
lua main.lua
```

### C++ Version

To use the triangle calculator for this version, compile `main.cpp` using the command `g++ src/cpp/main.cpp -o bin/main` and then run `bin/main` and follow the prompts to enter the side lengths to determine if something or not.
Run the commands specific to your operating system. Follow the prompts afterwards.

#### Windows

```bash
g++ src\cpp\main.cpp -o bin\main
bin\main
```

Please note that this version is behind the Lua version in some user friendly input aspects but it is still usable. It is the same version as I wrote in college, so that's why.
#### Linux

```bash
g++ src/cpp/main.cpp -o bin/main
bin/main
```

## Contributing

Expand Down

0 comments on commit 90f9f78

Please sign in to comment.