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
| from random import randint | |
| import pygame | |
| from pygame.locals import * | |
| import time | |
| W = 10 | |
| PLAYER = 20 | |
| ROBOT = 30 | |
| DEAD_ROBOT = 35 | |
| HAZARD = 40 |
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
| class State: | |
| state_handlers = { | |
| 's_open': ('h_open', 'h_num'), | |
| 's_close': ('h_close', 'h_op'), | |
| 's_num': ('h_num'), | |
| 's_op': ('h_op') | |
| } | |
| state_map = { | |
| 'h_open': 's_open', |
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
| def read_chunk(dst, src, chunk_size, pos, len_src): | |
| while chunk_size > 0 and pos < len_src: | |
| dst.append(src[pos]) | |
| pos += 1 | |
| chunk_size -= 1 | |
| return pos | |
| def get_bingo_size(pos, chunk_size, len_src): | |
| if pos + chunk_size > len_src: | |
| return len_src - pos |
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
| extern crate sdl2; | |
| use sdl2::rect::Rect; | |
| use sdl2::pixels::Color; | |
| use sdl2::render::WindowCanvas; | |
| use std::time::Duration; | |
| trait Renderer { | |
| fn render( | |
| & self, canvas: & mut WindowCanvas, |
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
| <?php | |
| $infile = $argv[1]; // font image file name | |
| $w = $argv[2]; // font char width | |
| $h = $argv[3]; // font char height | |
| $color_x = $argv[4] ?? 0; // x coordinate of font color sample | |
| $color_y = $argv[5] ?? 0; // y coordinate of font color sample | |
| $img = imagecreatefrompng($infile); | |
| $img_w = imagesx($img); | |
| $img_h = imagesy($img); |
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
| #define SDL_MAIN_HANDLED | |
| #include <SDL2/SDL.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <math.h> | |
| #define SURF_W 640 | |
| #define SURF_H 640 |
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
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <process.h> | |
| #include <time.h> | |
| #include <string.h> | |
| #define LETTER_CNT 5 | |
| typedef enum { |
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
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <process.h> | |
| #include <time.h> | |
| #include <string.h> | |
| #include <windows.h> | |
| #define LETTER_CNT 5 |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <windows.h> | |
| #define LETTER_CNT 5 | |
| #define DICT_NODE_CNT 16384 | |
| #define DICT_NIL 16384 |
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
| абака | |
| аббат | |
| абвер | |
| абзац | |
| аборт | |
| абрек | |
| абрис | |
| абхаз | |
| абцуг | |
| абшид |
OlderNewer