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
| import Rx from 'rx'; | |
| const eventNames = [ | |
| 'canplay', 'play', 'pause', 'ended', 'error', | |
| 'timeupdate', 'progress', 'seeking', 'seeked', 'loadedMetaData' | |
| ]; | |
| export default class Audio { | |
| constructor() { | |
| this.subjects = { |
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
| var CELL_SIZE = 30, | |
| MAP_SIZE = 20, | |
| VISUAL_FRAME_COUNT = 10, | |
| INFINITY = Infinity, | |
| MAP = [ | |
| [2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
| [1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
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
| % add this line to somewhere in the source file | |
| it:- it(Message, P), (call(P)-> write('\x1b[32;1mpassed\x1b[0m');write('\x1b[31;1mfailed\x1b[0m')), write(' '),write(Message), nl, fail. | |
| % add ass many of this line as you need | |
| % it('<message>', <expression>). | |
| % expression is the thing you want to test that is supposed to be provable if your code works fine. | |
| % message is the description of the thing you want to test.. | |
| it('Ayse is Ali's mother', mom(ayse, ali)). | |
| it('Osman is not Ali's mother', \+ mom(osman, ali)). |