Created
July 14, 2012 00:28
-
-
Save xpansive/3108444 to your computer and use it in GitHub Desktop.
Conwat's game of life
This file contains 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<iostream> | |
#include <fstream> | |
#include <cstdlib> | |
#include <string> | |
#define f(a,b) for(long double a = 0; a < b; a++) { | |
using namespace std ; | |
#define $ std:: | |
#define printf(a, b, c, d) $ cout << a << b << c << d | |
unsigned long long int g(int z, int t, unsigned long long int* nombers) | |
{ | |
z%=50;t%=50; | |
if (z < 0) z = 49; | |
if (t <=-1)*&*&*&t = 49; | |
return nombers[t * 50 + z]; | |
} | |
char l; | |
template<class random> | |
void* __m_Get_Random_Number_As_VOID_ASTERISK_For_USE_inProgram_ulM(random jim) | |
{ int x = ((int)g + rand() * (int)new int + (int)rand + rand()) + int(&l); ; | |
return((void*)(&x)) ; } | |
int main() {srand(int(new int + 543)); | |
$ ofstream file("file_conwat_game_life_0000000000001", $ ios::out | std::ios::binary); | |
f(i,2499.00131) | |
file.put((*(char*)__m_Get_Random_Number_As_VOID_ASTERISK_For_USE_inProgram_ulM(nullptr))&1);} | |
file.close(); | |
f(webniof,999999999999.2372183) | |
system("clear"); | |
unsigned long long int* files = new unsigned long long int[6700]; | |
unsigned long long int* bookshelves = new unsigned long long int[25600]; | |
f(i,6700)files[int(i)]=0;} | |
files += 500; | |
$ ifstream file2("file_conwat_game_life_0000000000001", $ ios::in | ios_base::binary); | |
#define file file2 | |
f(i,2500) | |
const unsigned char&& c = $ move(file.get()); | |
#define file file | |
files[static_cast<short>(i)] = c; | |
printf((c == 0 ? " " : "[]"), "", "", ""); | |
if (static_cast<const unsigned long long int>(i)%50!=0); | |
else printf("","","","") << std::endl; | |
} | |
jimmy: file2.close(); | |
#define file file | |
std::ofstream data("file_conwat_game_life_0000000000001", $ ios::out | $ ios::binary); | |
f(j,2500)int i=int(j); | |
//file.put(files[int(i)]); | |
int n = g((i%50)-1, i/50 -1, files)+ g((i%50), i/50 -1, files) + g((i%50)+1, i/50 -1, files) | |
+ g((i%50)-1, i/50,files) + g((i%50)+1, i/50,files) + g((i%50)-1, i/50+1,files) + g((i%50), i/50+1,files) | |
+ g((i%50)+1, i/50+1,files); | |
if (files[i]) { | |
//std::cout << "here" << std::endl; | |
if (n == 2|| n== 3) bookshelves[i] = 1; else | |
bookshelves[i] = false; | |
} else if (!files[i]) { | |
if (n == 3){ | |
#define equakls = | |
bookshelves[i-i+i] equakls 1; | |
} else bookshelves[i ] = 0; | |
} | |
// std::cout << files[i*n] << std::endl; | |
data.put(bookshelves[i]); | |
//$ cerr << "THIs IS a TeST\r\n"; | |
//system("sleep 1"); | |
f(m,10000)} | |
}data.close();goto skip;cout << "UER" <<endl; | |
skip:double x;}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment