examples
所属分类:collect
开发工具:Assembly
文件大小:0KB
下载次数:0
上传日期:2023-03-01 17:09:16
上 传 者:
sh-1993
说明: 用每种编程语言编写的节拍器命令!,
(Commands for Metronome written in every programming language!,)
文件列表:
LICENSE (1080, 2023-03-01)
c/ (0, 2023-03-01)
c/Makefile (95, 2023-03-01)
c/main.c (1953, 2023-03-01)
cpp/ (0, 2023-03-01)
cpp/Makefile (102, 2023-03-01)
cpp/main.cpp (881, 2023-03-01)
haskell/ (0, 2023-03-01)
haskell/CHANGELOG.md (110, 2023-03-01)
haskell/Main.hs (1752, 2023-03-01)
haskell/Setup.hs (46, 2023-03-01)
haskell/haskell.cabal (696, 2023-03-01)
lua/ (0, 2023-03-01)
lua/main.lua (2018, 2023-03-01)
rust/ (0, 2023-03-01)
rust/Cargo.toml (120, 2023-03-01)
rust/src/ (0, 2023-03-01)
rust/src/main.rs (970, 2023-03-01)
x86_64/ (0, 2023-03-01)
x86_64/Makefile (169, 2023-03-01)
x86_64/rand_starters.asm (8485, 2023-03-01)
# Metronome Examples
A repository that shows the extendability of the
[Metronome](https://github.com/TM35-Metronome) project by writing commands for it in any
programming language.
## Example
The examples implement a super a simple command that randomizes starter Pokémons.
These examples are written to be simple first a formost, so some of them might assume certain
things about the data they get passes in:
* That there are at most 3 starters.
* That you can simply look at the biggest `pokemons` index to figure out the range of
`0..N` to pick from.
* That all pokemons are valid options to pick. In some games, you are only allow to have
pokemons that the pokedex contains.
In a real command, one should not assume these to be true:
* A game can have any number of starters
* Entries does not actually need to be continues. This is valid and should be handled:
```
.pokemons[1].hp=3
.pokemons[4].hp=1
.pokemons[7].hp=11
```
See [`tm35-rand-starters`](https://github.com/TM35-Metronome/metronome/blob/master/src/randomizers/tm35-rand-starters.zig)
for how this command would actually be written to handle everything correctly.
## Languages:
* [`C`](c/main.c)
* [`C++`](cpp/main.cpp)
* [`Haskell`](haskell/Main.hs)
* [`Lua`](lua/main.lua)
* [`x86_64 assembly (linux)`](x86_64/rand_starters.asm)
近期下载者:
相关文件:
收藏者: