This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| $l=($s='rtlntr"" ,h ahkP trcr\ain;eepeusnoJ')=~y///c;for(1..$l){@a=sort@a; | |
| for(0..$l-1){$a[$_]=substr($s,$_,1).$a[$_]}}for(@a){eval$_ if/;$/} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This HexChat MRuby plugin lets people play a game of | |
| # Mastermind AKA Bulls & Cows | |
| # https://en.wikipedia.org/wiki/Bulls_and_Cows | |
| class Bulls < HexChat::Plugin | |
| # So it works on a channel: | |
| on :print, 'Channel Message' do |words| | |
| process_event(words) | |
| EAT_NONE | |
| end |
NewerOlder