Author Topic: Making up code for you habits  (Read 9098 times)

0 Members and 2 Guests are viewing this topic.

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Making up code for you habits
« Reply #15 on: June 05, 2013, 11:32:59 pm »
While (nojob):
    sleep(20)
In-progress: Graviter (...)

Offline JamesV

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 276
  • Rating: +77/-0
    • View Profile
    • James V's TI-Calculator page
Re: Making up code for you habits
« Reply #16 on: June 06, 2013, 12:17:47 am »
Code: [Select]
if (bored && hasSpareTime) {
  makeYetAnotherAlienBreed();
}
else {
  daydreamAboutAnotherAlienBreed();
}

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Making up code for you habits
« Reply #17 on: June 06, 2013, 12:24:45 am »
If freetime== true then
  WorkAllDay ()
end

It's making me crazy.
I'm not a nerd but I pretend:

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Making up code for you habits
« Reply #18 on: June 06, 2013, 02:05:07 am »
Code: [Select]
/*
 * life.c
 *
 * Copyright 2013 shmibs <[email protected]>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 *
 *
 */


#include <stdio.h>

typedef struct show {
video episodes[26];
video extras[4];
} show;

typedef enum p_type {
AXE,
C,
PERL,
BASH,
ASM,
DESKTOP_CONFIGS,
FIXING_ARCH_AFTER_HAVING_BROKEN_IT_YET_AGAIN
} p_type;

typedef struct project {
p_type type;
int difficulty;
} p_type;

typedef struct chan {
member member_list[40]; /* i never talk in channels with more than 40 people. they're too hectic */
topic current_topic;
} chan;

typedef struct amusement_node {
show current_anime;
video current_film;
book current_book;
album current_album;
chan current_channel;
project current_project;
amusement_node* next;
} amusement_node;

int main(int argc, char **argv) {
int depressed, busy=FALSE, day=0, age=0;
amusement_node* head=NULL, temp;

while(TRUE) {
while(schoolwork_check()) {
do_schoolwork();
depressed=TRUE;
busy=TRUE;
}

if(head != NULL) {
process_amusement(head);
if(!(rand()%3)) {
depressed=FALSE;
} else {
depressed=TRUE;
}
temp=head->next;
free(head);
head=temp;
busy=TRUE;
}

if(!busy)
depressed=TRUE;

day++;

if(!(day%365)) {
age++;
}

if(!(rand%( (100-age)*2000)))
break;
}

return 0;
}
« Last Edit: June 06, 2013, 02:13:41 am by shmibs »

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: Making up code for you habits
« Reply #19 on: June 06, 2013, 01:38:55 pm »
Code: [Select]
public static void getUp(){
    UnderwearDrawer.takeRandom().wear();
    body.arm.pushAway(blanket);
    body.performMotion(Motion.stand_up);
    body.legs.walkTo(closet.getLocation());
    body.arm.interact(closet.door,Action.open);
    tshirtStack.takeTopOne().wear();
    sweaterStack.takeTopOne().wear();
    pants.takeRandom();
    body.arm.interact(closet.door,Action.close);
    body.legs.walkTo(room.door.getLocation());
    body.arm.interact(room.door,Action.open);
    body.legs.walkTo(stairs.getLocation());
    body.performMotion(Motion.walkDownStairs);
}
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated