ringing ringing terminal
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
fafrotskies
.gitignore
LICENSE
README.md
fafrotskies.sln

README.md

fafrotskies

ringing ringing terminal

Requirements

  • .NET Framework 4 or later. (also works on Mono!)
  • NuGet

Dependencies

If you are a Visual Studio lover, all dependencies will be resolved automatically. So, you build this with VS, all things are done!

Otherwise (for Mono users), first, you should get NuGet client (see NuGet's document). After that, in the solution root directory, do:

% mono nuget.exe restore fafrotskies.sln

Usage

fafrotskies [--port PORT] problem_file

--port is optional. The server will listen on port 3939/tcp by default.

Problem File

It's YAML file.

name: Problem Name
description: |
  Problem Description here!
  Let's study elementary mathemathics!
stages:
  -
    num: 4
    clear_message: Stage 1 cleared. Flag is FLAG{STAGE_ONE}
  -
    num: 2
    enter_message: Okay! Keep goin'
  -
    num: 1
    enter_message: The LAST stage!
    clear_message: Complete! Flag is FLAG{CLEAR}
limit: 10
cases:
  -
    problem: 1+1=?
    answer: 2
  -
    problem: 3*3=?
    answer: 9
    limit: 15

Time Limit

limit in the root hash is the default time limit, and limit in the cases hash is the problem specific time limit. In the above case, for case 1, the limit is 10 seconds, and for case 2, the limit is 15 seconds.

Cases Generator

Fafrotskies can send the cases generated by the specified command instead. To delegate the case generating, change cases item like:

# problem definitions...
cases:
  cmd: casegen %s

%s will be replaced with the stage number.

The generator should write the case to the standard output. The output format is the Hash of YAML, such as:

problem: generated problem 1
answer: generated answer 1
limit: 5

The output should NOT be an array, so the following output is invalid:

-
  problem: bad one
  answer: soooo bad!

telnet Sample

% telnet localhost 3939
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome. We are the fafrotskies.

===== problem test =====
This is the test!

#1
here is the simple equation.
do you know... 1+1=?
2
#2
okay. Let's get to the next stage.
The next is: 2+2=?
4
Congratulations!
Flag is FLAG{123456789abcdef}
Connection closed by foreign host.

Copyright

Copyright 2014 mayth (Mei Akizuru; @maytheplic)
Licensed under the MIT License. See LICENSE.

Packages' License

Fafrotskies?

\  /   この幻想郷では常識に囚われては
●  ●   いけないのですね!
" ▽ "