Jump to content
adamantyr

10 Line XB Entry: Python

Recommended Posts

Joystick required. Dodge the cars and get your python across the road as many times as you can!

 

post-17978-0-53169600-1559759190.png

100 CALL CLEAR :: CALL SCREEN(4) :: CALL MAGNIFY(3) :: CALL COLOR(9,12,2,10,2,15,11,13,13) :: FOR I=128 TO 140 STEP 4 :: READ C$ :: CALL CHAR(I,C$) :: NEXT I
110 CALL CHAR(96,"000000F0F",97,"0",104,RPT$("8000",4),105,"0") :: CALL HCHAR(23,1,105,128) :: CALL HCHAR(10,1,112,192) :: FOR I=1 TO 31 STEP 2
120 CALL VCHAR(1,I,104,2) :: CALL VCHAR(23,I,104,2) :: NEXT I :: CALL HCHAR(3,1,97,224) :: CALL HCHAR(16,1,97,224) :: CALL HCHAR(6,1,96,32) :: L=1 :: S=0
130 CALL HCHAR(19,1,96,32) :: N=MIN(3,1+INT(L/2)) :: Z=2 :: FOR I=0 TO 1 :: FOR J=0 TO 1 :: FOR K=0 TO N-1 :: C=1+K*80+RND*60 :: V=(J=0)*MIN(4+L,48)-(J=1)*MIN(4+L,48)
140 CALL SPRITE(#Z,136+4*J,3+INT(RND*14),20+I*104+J*32,C,0,V) :: Z=Z+1 :: NEXT K :: NEXT J :: NEXT I :: CALL SPRITE(#1,128,14,176,120)
150 CALL JOYST(1,Y,X) :: CALL COINC(ALL,I) :: CALL POSITION(#1,R,C) :: IF I THEN CALL DELSPRITE(ALL) :: GOTO 110
160 IF R<16 THEN CALL DELSPRITE(ALL) :: S=S+10*L :: L=L+1 :: DISPLAY AT(12,14):S; :: GOTO 130
170 CALL MOTION(#1,-X*4,Y*4) :: A=A+4 AND 4 :: CALL PATTERN(#1,128+A) :: GOTO 150
180 DATA 01030303010000000003070E0C0C070100808080E0F0381838F0C000000000C0,00010101070F1C181C0F03000000000380C0C0C08000000000C0E0703030E080
190 DATA 000000000304047FFFE75B3C1800000000000000FECE87FFFFE7DA3C18000000,000000007F73E1FFFFE75B3C1800000000000000C02020FEFFE7DA3C18000000
  • Like 8

Share this post


Link to post
Share on other sites

Nice job! Love seeing all the cool stuff in the language I first coded in (besides TI BASIC (non-XB) and Apple IIe BASIC) a lifetime ago!

 

Until I get time to bang out a 10 line XB program, here's my 10 lines of silliness for the day from a quick REST endpoint being used for a latency test. I know...somewhat off topic...but been seeing all the cool 10 line XB things come in when I realized my quick and dirty from work today was roughly the right length. Just the wrong platform and language. ;)

 

 

@RestController

public class SaasicaneRestController {

private final String fallbackQuote = "Flatulence is an oft-ignored path to inspiration";
private final Map<String, String> characterQuotes = Map.of("Yoda","Do or do not. There is no try.", "Tony Montana", "Say hello to my little friend!");


@RequestMapping("/moviequote")
public MovieQuote findAQuote(@RequestParam(value="characterName", defaultValue="Hurricane") String characterName) {
return new MovieQuote(characterName, characterQuotes.getOrDefault(characterName, fallbackQuote));
}
}

 

docker run -p 8080:8080 mcmichaelwphat/moviequoteapp

 

curl http://localhost:8080/moviequote?characterName=Tony%20Montana

Edited by patrickmcmichael
  • Like 1

Share this post


Link to post
Share on other sites

OMG. This is really good. It's smooth, nice and to the point. BITD this would have been a super game for your $9.95, - only, you'd be surprised that it loads so fast.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...