Giter VIP home page Giter VIP logo

obfuscate's Introduction

conway's game of life

samarth kulshrestha

code quality top language
license

Introduction

obfuscate is a project where the code of a conway's game of life implementation is obfuscated and formatted as a glider.

                 x,y,cx,cy,dx,
                 dy,n,f[8][16]
                 ,b[8][16];main
                 (){f[0][1]=1;
                 f[1][2]=1;f[2
                 ][0]=1;f[2][1
                 ]=1;f[2][2]=1

                                 ;for(;;){for(cy
                                 =0;cy<8;++cy){
                                 for(cx=0;cx<16
                                 ;++cx){printf(
                                 "%c",".*"[f[cy
                                 ][cx]]);n=0;for
                                 (dx=-1;dx<=1;++

dx)for(dy=-1;    dy<=1;++dy)if   (!(dx==0&&dy==
0)){x=((cx+dx    )%16+16)%16;y   =((cy+dy)%8+8)
%8;if(f[y][x]    )n+=1;}b[cy][   cx]=f[cy][cx]?
(n==2||n==3):    n==3;}printf(   "\n");}memcpy(
f,b,sizeof(f)    );printf("\033" "[%dA\033[%dD"
,8,16);usleep    (100*1000);}}   //*^7shc*7"jh"

Files

Building

running the following commands will build all of the aforementioned files and put the executables in target.

$ make
$ ./conway

Contribute

  • I <3 pull requests and bug reports!
  • Don't hesitate to tell me my code-fu sucks, but please tell me why.
  • Feel free to fork the project and try out your own optimisations.

License

Obfuscate is licensed under the MIT License.

Copyright (c) 2023 Samarth Kulshrestha.

obfuscate's People

Contributors

samarthkulshrestha avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.