Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perigrin/perl-games-rot
https://github.com/perigrin/perl-games-rot
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/perigrin/perl-games-rot
- Owner: perigrin
- Created: 2023-03-08T06:19:14.000Z (almost 2 years ago)
- Default Branch: pu
- Last Pushed: 2024-08-21T17:22:21.000Z (5 months ago)
- Last Synced: 2024-08-21T19:35:59.320Z (5 months ago)
- Language: Perl
- Size: 31.3 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Games::ROT
A Perl library inspired by [ROT.js](https://ondras.github.io/rot.js/hp/) the ROuglelike Toolkit for JavaScript/TypeScript.
## Synopsis
```perl
#!/usr/bin/env perl
use strict;
use lib qw(lib);
use Feature::Compat::Class;use Games::ROT;
class Engine {
my $WIDTH = 800;
my $HEIGHT = 500;field $display = Games::ROT->new(
width => $WIDTH,
height => $HEIGHT,
);method render() {
my $x = $WIDTH / 2;
my $y = $HEIGHT / 2;$display->draw($x, $y, 'Hello World', '#fff', '#000');
}
}my $engine = Engine->new();
$engine->render();
```