APCG 180 Lecture Notes - Lecture 1: Computer-Aided Design
Document Summary
// if the square of the distance is less than or equal to the square of the radius then true, return (((delta_x * delta_x) + (delta_y * delta_y)) <= (radius * radius)) else false. //calculates the score based on the dart location, center of target, size of the overall target and how_many rings in the target function scoredart(dart_x, dart_y, center_x, center_y, size, how_many) target, the size and how many rings. // calculates a dart x & y, draws the dart and add to the score based on the center of the. // draws the dart in the player"s color.