Skip to content

Commit

Permalink
Trying to set up basic env
Browse files Browse the repository at this point in the history
  • Loading branch information
JanEricNitschke committed May 26, 2024
1 parent d1c3a1d commit bc607eb
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/basic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will run stuff on the basic version of tictactoe

name: Basic

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tictactoe_basic
steps:
- uses: actions/checkout@v4
- name: Install fbc
run: |
sudo apt-get install libtinfo5
wget -O FreeBASIC-1.10.1-linux-x86_64.tar.gz 'http://downloads.sourceforge.net/fbc/FreeBASIC-1.10.1-linux-x86_64.tar.gz?download'
ls
tar xzf FreeBASIC-1.10.1-linux-x86_64.tar.gz
cd FreeBASIC-1.10.1-linux-x86_64
sudo ./install.sh -i
fbc --version
- name: Compile
run: fbc tictactoe_basic.bas
- name: Run
run: ./tictactoe_basic
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,3 +296,6 @@ repos:

# C# specific
# None

# basic specific
# None
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,16 @@ Run with:
./tictactoe_bash.sh
```

## TicTacToe-Basic

Version using [Basic](https://www.freebasic.net/).

Compile and run with:
```bash
fbc tictactoe_basic.bas
./tictactoe_basic
```

## TicTacToe-scratch
Very simple two player tictactoe game with Scratch.

Expand Down
18 changes: 18 additions & 0 deletions tictactoe_basic/tictactoe_basic.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function AddNumbers( a as integer, b as integer ) as integer
return a + b
end function

sub hello( )
print "hello"
end sub

declare sub myprint( num as integer )

'Code outside any procedures is the main part of the program
hello( )
print AddNumbers( 1, 1 )
myprint 5

sub myprint( num as integer )
print num
end sub

0 comments on commit bc607eb

Please sign in to comment.