PHP Classes

How to Use a PHP Game Engine to Play the Dinobot Game using the Package Dinobot on Tabletop Game: Play the Dinobot game on the terminal console

Recommend this page to a friend!
  Info   Example   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-08-04 (8 months ago) RSS 2.0 feedNot enough user ratingsTotal: 22 All time: 11,306 This week: 63Up
Version License PHP version Categories
dinobot-on-tabletop- 1.0GNU General Publi...8Games, Console, PHP 8
Description 

Author

This package allows you to Play the Dinobot game on the terminal console.

It allows people to play the Dinobot game by entering commands that define the player's moves.

The game can report the player's position in the game as a response to the report command.

Picture of Pierre-Henry Soria
  Performance   Level  
Innovation award
Innovation award
Nominee: 18x

Winner: 3x

Example

#!/usr/bin/env php
<?php declare(strict_types=1);

@
set_time_limit(0);
@
ini_set('memory_limit', '528M');

require_once
dirname(__DIR__) . '/vendor/autoload.php';

use
App\Command\ToyCommand;
use
Symfony\Component\Console\Application;

$app = new Application();

$toy = new ToyCommand();
$app->add($toy);
$app->setDefaultCommand($toy->getName(), true);

$app->run();


Details

Dinobot Robot Simulator ?

Dinobot - Draft

Usage

Open a console and execute php bin/toy, a prompt character (>) will be shown. Available command:

  • `place x,y,face` \ will put the toy robot on the table in position `x`, `y` and facing `north`, `south`, `east`, or `west`. This command should called first before another command. You cannot place a toy robot beyond the barrier.
  • `move` \ will move the toy robot one unit forward in the direction it is currently facing.
  • `left` or `right` \ will rotate the robot 90 degrees in the specified direction without changing the position of the robot.
  • `path` \ will give the path to take from the current position to a specific destination. e.g. `path 0,1`
  • `q` \ Exit the prompt.

Example:\ ![](./example.png)

Development

  1. Fork and clone this repo.
    git clone git@github.com:pH-7/dinobot-on-tabletop-game.git
    
  2. Install all dependencies
    composer install
    
  3. Install development tools using `phive`
    phive install
    
  4. Before commit the change, make sure there are no coding style or `phpstan` violations by executing
    vendor/bin/phpcs
    tools/phpstan analyse
    
  5. Run unit testing by executing
    php bin/phpunit
    
  6. Unit testing coverage report
    php bin/phpunit --coverage-text
    

Screenshots (4)  
  • dinobot-draft.jpeg
  • example-results-path-finder.png
  • example-results-with-path-finder.png
  • example.png
  Files folder image Files (49)  
File Role Description
Files folder imagebin (3 files)
Files folder imageconfig (5 files, 2 directories)
Files folder imagepublic (1 file)
Files folder imagesrc (1 file, 6 directories)
Files folder imagetests (1 file, 1 directory)
Accessible without login Plain text file .env.dist Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file docker-compose.override.yml Data Auxiliary data
Accessible without login Plain text file docker-compose.yml Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpcs.xml.dist Data Auxiliary data
Accessible without login Plain text file phpstan.neon.dist Data Auxiliary data
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file symfony.lock Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:22
This week:0
All time:11,306
This week:63Up