Skip to content

cocode/TrekBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo TrekBot

TrekBot is a tool to exercise the vintage computer game 'superstartrek'. It acts as a player, and plays repeated games to exercise all corners of the game.

TrekBot is part of the TrekBasic family of BASIC programming tools.

  • TrekBasic - Basic compiler and interpreter in Python
  • TrekBasicJ - Basic compiler and interpreter in Java
  • BasicRS - Basic compiler written in Rust
  • BasicTestSuite - A test suite of BASIC Programs
  • TrekBot - A tool to exercise the superstartrek program

All versions, interpreted and compiled, are intended to by byte-by-byte compatible, but are not there yet - but they are close. TrekBot and BasicTestSuite are part of the plan to ensure full compatibility.

Running TrekBot

To run with coverage:

cargo run -- benchmark --program ../BasicRS/superstartrek.bas --games 5 --coverage-file coverage.json

Full command with more options

cargo run -- benchmark --program superstartrek.bas --display --max-turns 1000 --strategy random --interpreter basic-rs --basicrs-path /Users/tomhill/RustroverProjects/BasicRS/target/debug/basic_rs  --coverage-file coverage.json
# Generate reports

Code Coverage Report

These both generate a code coverage report. The code coverage report generator is part of the various basic implementions. You'll need to run it from the BASIC interpreter directory, and point to the coverage file generated by TrekBot.

In this case, BasicRS is next to TrekBot:

cd ../BasicRS
cargo run --bin basic_coverage -- ../TrekBot/coverage.json superstartrek.bas --verbose

cargo run --bin basic_coverage -- ../TrekBot/coverage.json superstartrek.bas --html coverage_report.html

About

TrekBot is a bot that plays superstartrek. It's used for testing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published