Uruguay christmas
Author: Antonio Vázquez
Category: Christmas Challenge
System: Spectrum ZX80
Language: BASIC
Len source code: 175 bytes
Len exe file: 259 bytes
Len code only: 175 bytes
Instructions: load "" y run en emulador
Description:
Three lines are made that intersect, taking advantage of the rebound effect when reaching negative values on both axes, the positive missing bounce is added with a conditional sum.
example of the first bounce:
start at the left edge of the image
When crossing y=0 the line makes an apparent rebound
----------
! *
! * *
! * <-- start from here
!
second rebound
--------------
! *
! * *
! *
! *
! *
!*
! *
third bounce, here we look for the index where
it must be bounced and a recovery operation is applied
conditional subtraction subtracting double the
difference -(2*n and i>10)
--------------
! *
! * *
! * *
! *
! *
!* *
! * *
! *
Comments:
The challenge was very fun, thank you!!