Error AngularJS + spring, dont compile - angularjs

When I access my index.html I get this
Error page
index.html
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
</head>
<body>
<div>
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here">
<hr>
<h1>Hello {{yourName}}!</h1>
</div>
</body>
</html>
I'm trying to make AngularJS compile in a spring project
console error:
2017-08-18 12:16:00.356 ERROR 90004 --- [io-8084-exec-10] o.thymeleaf.templateparser.ErrorHandler : [THYMELEAF][http-nio-8084-exec-10] Fatal error during parsing
org.xml.sax.SAXParseException: O nome do atributo "ng-app" associado a um tipo de elemento "html" deve ser seguido do caractere ' = '.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) [na:1.8.0_131]
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source) [na:1.8.0_131]
at org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.doParse(AbstractNonValidatingSAXTemplateParser.java:209) [thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplateUsingPool(AbstractNonValidatingSAXTemplateParser.java:134) [thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplate(AbstractNonValidatingSAXTemplateParser.java:116) [thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:278) [thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104) [thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060) [thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011) [thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335) [thymeleaf-spring4-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190) [thymeleaf-spring4-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1271) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:208) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:115) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:59) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:90) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.11.jar:8.5.11]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_131]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.11.jar:8.5.11]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_131]
2017-08-18 12:16:00.356 ERROR 90004 --- [io-8084-exec-10] org.thymeleaf.TemplateEngine : [THYMELEAF][http-nio-8084-exec-10] Exception processing template "index": Exception parsing document: template="index", line 1 - column 29
2017-08-18 12:16:00.357 ERROR 90004 --- [io-8084-exec-10] o.s.boot.web.support.ErrorPageFilter : Forwarding to error page from request [/] due to exception [Exception parsing document: template="index", line 1 - column 29]
org.thymeleaf.exceptions.TemplateInputException: Exception parsing document: template="index", line 1 - column 29
at org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplateUsingPool(AbstractNonValidatingSAXTemplateParser.java:166) ~[thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplate(AbstractNonValidatingSAXTemplateParser.java:116) ~[thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:278) ~[thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104) ~[thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060) ~[thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011) ~[thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335) ~[thymeleaf-spring4-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190) ~[thymeleaf-spring4-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1271) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:208) ~[spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) ~[spring-security-web-4.2.1.RELEASE.jar:4.2.1.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:115) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:59) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:90) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108) [spring-boot-1.5.1.RELEASE.jar:1.5.1.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) [tomcat-embed-core-8.5.11.jar:8.5.11]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.11.jar:8.5.11]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_131]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.11.jar:8.5.11]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_131]
Caused by: org.xml.sax.SAXParseException: O nome do atributo "ng-app" associado a um tipo de elemento "html" deve ser seguido do caractere ' = '.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ~[na:1.8.0_131]
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source) ~[na:1.8.0_131]
at org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.doParse(AbstractNonValidatingSAXTemplateParser.java:209) ~[thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
at org.thymeleaf.templateparser.xmlsax.AbstractNonValidatingSAXTemplateParser.parseTemplateUsingPool(AbstractNonValidatingSAXTemplateParser.java:134) ~[thymeleaf-2.1.5.RELEASE.jar:2.1.5.RELEASE]
... 66 common frames omitted

You should always check the console (in developer tools - in Chrome click F12) to see if there are any errors, but if everything else is right, you need to specify the app name and controller name like this:
HTML:
<html ng-app="appname">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
</head>
<body>
<div ng-controller="ctrlname">
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here">
<hr>
<h1>Hello {{yourName}}!</h1>
</div>
</body>
</html>

I forgot some things:
ng-app="name"
Close </hr> and </input> tag

Related

Can't show json in angular

body: Object
und: Array[1]
0: Object
format: "full_html"
safe_summary: ""
safe_value: "<p dir="rtl" style="text-align: justify;">اگر دوست دارید قدرت دویدنتان زیاد شود و بیشتر بدوید و آسیب های ناشی از دویدن را هم نداشه باشید توصیه های زیر را بخوانید تا موفقیت خوبی هنگام دویدن نصیبتان شود.<br /><strong>1- هر روز بدوید</strong><br />تداوم، کلید موفقیت در برنامه است. اگر هر روز بدوید، توانایی بدن برای سوزاندن چربی هم بیشتر می شود.<br /><br /><strong>2- لباس مناسب برای دویدن بپوشید</strong><br />بلوز،‌ شلوار و کفش ورزشی مناسب برای دویدن بپوشید. این کار هم بدن شما را در بهترین فرم و حالت نگه می دارد و هم انگیزه بخش بوده و یک وسیله تشویقی برای دویدن محسوب می شود.<br /><br /><strong>3- انعطاف پذیری خودتون را افزایش بدهید</strong><br />از تجهیزات ورزشی مناسب برای افزایش انعطاف پذیری بدن استفاده کنید تا در زمان دویدن، توانایی و ظرفیت بیشتری داشته باشید. مثلاً می توانید سه جلسه در هفته از بالش پیلاتس استفاده کنید. استفاده از این وسیله، احتمال جراحت هنگام دویدن را کمتر کرده و اثرات مفیدتری نسبت به حرکات کششی ایستا دارد<br /> <br /><strong>4- برای دویدن دلیل داشته باشید</strong><br />به یاد داشته باشید که شما از فرصت فوق العاده ای در زندگی بهرمند هستید که شاید خیلی از افراد دیگر، این فرصت رو نداشته باشند و به هر دلیلی نتوانند بدوند. این یک دلیل فوق العاده مهم و ارزشمند است. این فرصت را که به طور طبیعی در اختیار شما قرار داده شده است، هدر ندهید.<br /><br /><strong>5- هنگام دویدن لباس های خیلی گرم یا زیاد نپوشید</strong><br />همیشه طوری لباس بپوشید که انگار دمای محیط چند درجه گرم تر از میزان واقعی آن است. چون وقتی که شروع به دویدن می کنید،‌ بدن به طور خود به خود گرم می شود و اگر لباس زیادی پوشیده باشید،‌ احساس گرمای طاقت فرسایی خواهید کرد.<br />هرچه انعطاف بدن بیشتر باشد احتمال جراحت هنگام دویدن کمتر است<br /><br /><strong>6- با دونده های دیگر خودتان را مقایسه نکنید</strong><br />خودتان را با خودتان مقایسه کنید نه با بقیه دونده ها. مسلماً همیشه فرد یا افرادی وجود دارند که از شما سریع تر می دوند و ورزشکار تر به نظر می رسند. بر روی پیشرفت خودتان تمرکز کنید و افکار منفی و دلسرد کننده را از خودتان دور کنید.<br /><br /><strong>7- برای دویدن از سطوح شیب دار استفاده نکنید</strong><br />هیچ وقت در سراشیب تپه ها ندوید. نیروی بسیار شدید که با دویدن در سراشیب به زانو ها وارد می شود، برای زانوها مضر است.<br /><br /><strong>8- هر روز به خودتان فشار نیاورید</strong><br />برای تقویت بدن،‌ باید به آن فرصت بدهید تا به بازسازی خود بپردازد. پس نباید هر روز با شدت خیلی زیاد ورزش کنید. بعضی از روزهای هفته به ورزش با شدت کمتر بپردازید.<br /><br /><strong>9- به صورت گروهی بدوید</strong><br />دویدن حتی به صورت انفرادی هم لذتبخش است اما اگر فرد اجتماعی هستید و دوستانی دارید که به شما انگیزه می دهند، بهتر است که با هم به دویدن بپردازید.<br /><br /><strong>10- هنگام دویدن یک هدف مشخص تعیین کنید</strong><br />مثلاً با خودتان قرار بگذارید که یک ربع بدوید یا مثلاً چهار کیلومتر بدوید. سعی کنید که به هدفی که تعیین کرده اید،‌ برسید.</p>↵"
summary: ""
value: "<p dir="rtl" style="text-align: justify;">اگر دوست دارید قدرت دویدنتان زیاد شود و بیشتر بدوید و آسیب های ناشی از دویدن را هم نداشه باشید توصیه های زیر را بخوانید تا موفقیت خوبی هنگام دویدن نصیبتان شود.<br><strong>1- هر روز بدوید</strong><br>تداوم، کلید موفقیت در برنامه است. اگر هر روز بدوید، توانایی بدن برای سوزاندن چربی هم بیشتر می شود.<br><br><strong>2- لباس مناسب برای دویدن بپوشید</strong><br>بلوز،‌ شلوار و کفش ورزشی مناسب برای دویدن بپوشید. این کار هم بدن شما را در بهترین فرم و حالت نگه می دارد و هم انگیزه بخش بوده و یک وسیله تشویقی برای دویدن محسوب می شود.<br><br><strong>3- انعطاف پذیری خودتون را افزایش بدهید</strong><br>از تجهیزات ورزشی مناسب برای افزایش انعطاف پذیری بدن استفاده کنید تا در زمان دویدن، توانایی و ظرفیت بیشتری داشته باشید. مثلاً می توانید سه جلسه در هفته از بالش پیلاتس استفاده کنید. استفاده از این وسیله، احتمال جراحت هنگام دویدن را کمتر کرده و اثرات مفیدتری نسبت به حرکات کششی ایستا دارد<br> <br><strong>4- برای دویدن دلیل داشته باشید</strong><br>به یاد داشته باشید که شما از فرصت فوق العاده ای در زندگی بهرمند هستید که شاید خیلی از افراد دیگر، این فرصت رو نداشته باشند و به هر دلیلی نتوانند بدوند. این یک دلیل فوق العاده مهم و ارزشمند است. این فرصت را که به طور طبیعی در اختیار شما قرار داده شده است، هدر ندهید.<br><br><strong>5- هنگام دویدن لباس های خیلی گرم یا زیاد نپوشید</strong><br>همیشه طوری لباس بپوشید که انگار دمای محیط چند درجه گرم تر از میزان واقعی آن است. چون وقتی که شروع به دویدن می کنید،‌ بدن به طور خود به خود گرم می شود و اگر لباس زیادی پوشیده باشید،‌ احساس گرمای طاقت فرسایی خواهید کرد.<br>هرچه انعطاف بدن بیشتر باشد احتمال جراحت هنگام دویدن کمتر است<br><br><strong>6- با دونده های دیگر خودتان را مقایسه نکنید</strong><br>خودتان را با خودتان مقایسه کنید نه با بقیه دونده ها. مسلماً همیشه فرد یا افرادی وجود دارند که از شما سریع تر می دوند و ورزشکار تر به نظر می رسند. بر روی پیشرفت خودتان تمرکز کنید و افکار منفی و دلسرد کننده را از خودتان دور کنید.<br><br><strong>7- برای دویدن از سطوح شیب دار استفاده نکنید</strong><br>هیچ وقت در سراشیب تپه ها ندوید. نیروی بسیار شدید که با دویدن در سراشیب به زانو ها وارد می شود، برای زانوها مضر است.<br><br><strong>8- هر روز به خودتان فشار نیاورید</strong><br>برای تقویت بدن،‌ باید به آن فرصت بدهید تا به بازسازی خود بپردازد. پس نباید هر روز با شدت خیلی زیاد ورزش کنید. بعضی از روزهای هفته به ورزش با شدت کمتر بپردازید.<br><br><strong>9- به صورت گروهی بدوید</strong><br>دویدن حتی به صورت انفرادی هم لذتبخش است اما اگر فرد اجتماعی هستید و دوستانی دارید که به شما انگیزه می دهند، بهتر است که با هم به دویدن بپردازید.<br><br><strong>10- هنگام دویدن یک هدف مشخص تعیین کنید</strong><br>مثلاً با خودتان قرار بگذارید که یک ربع بدوید یا مثلاً چهار کیلومتر بدوید. سعی کنید که به هدفی که تعیین کرده اید،‌ برسید.</p>"
changed: "1440225054"
cid: "0"
comment: "2"
comment_count: "0"
created: "1440225054"
data: "b:0;"
field_external_link: Array[0]
field_image: Object
field_main_category_field: Object
field_show_slideshow: Object
title_original: "10 نکته برای بهتر دویدن"
This is my json from console that i copy here . This json is comming from Drupal that i want to show some data in ng-repeat .
when i add this to my html :
<div ng-repeat="data in innerData">
{{data.title_original}}
</div>
I'm assuming data is the variable holding the json. If that's true, I don't see any field title_original in it. Therefor, your code won't output anything.
Also, I see your json has some html in it. If you're sure the code is safe and can't inject unwanted tags (such as <script></script>), you should use the directive ng-bind-html to show that content and actually interpret it as HTML. This uses the sanitize module from angular.
See: https://docs.angularjs.org/api/ng/directive/ngBindHtml

ezxml xml parsing api

How to parse values if I have more than one tags, like in code above.
<formula1>
<team name="McLaren">
<driver>
<name>Abcd</name>
<points>112</points>
</driver>
<driver>
<name>Juan Pablo Montoya</name>
<points>60</points>
</driver>
</team>
</formula1>
<formula1>
<team name="McLaren">
<driver>
<name>Kimi Raikkonen</name>
<points>112</points>
</driver>
<driver>
<name>EFGH</name>
<points>60</points>
</driver>
</team>
</formula1>
I was able to print values between tags in first formula1 () with this code example:
ezxml_t f1 = ezxml_parse_file("formula1.xml");
printf("%s\n", ezxml_get(f1, "team", 0, "driver", 1, "name", -1)->txt);
ezxml_free(f1);
But don't know how to print values from second.
option 1. wrap
xml:
<root>
<formula1>
<team name="McLaren">
<driver>
<name>Abcd</name>
<points>112</points>
</driver>
<driver>
<name>Juan Pablo Montoya</name>
<points>60</points>
</driver>
</team>
</formula1>
<formula1>
<team name="McLaren">
<driver>
<name>Kimi Raikkonen</name>
<points>112</points>
</driver>
<driver>
<name>EFGH</name>
<points>60</points>
</driver>
</team>
</formula1>
</root>
code:
printf("%s\n", ezxml_get(f1, "formula1", 0, "team", 0, "driver", 1, "name", -1)->txt);
printf("%s\n", ezxml_get(f1, "formula1", 1, "team", 0, "driver", 0, "name", -1)->txt);
option 2. unify
xml:
<formula1>
<team name="McLaren">
<driver>
<name>Abcd</name>
<points>112</points>
</driver>
<driver>
<name>Juan Pablo Montoya</name>
<points>60</points>
</driver>
</team>
<team name="McLaren">
<driver>
<name>Kimi Raikkonen</name>
<points>112</points>
</driver>
<driver>
<name>EFGH</name>
<points>60</points>
</driver>
</team>
</formula1>
code:
printf("%s\n", ezxml_get(f1, "team", 0, "driver", 1, "name", -1)->txt);
printf("%s\n", ezxml_get(f1, "team", 1, "driver", 0, "name", -1)->txt);

Tool bar display issue in text-angular directive

I am using textAngular Directive to implement HTML editor in my application.
I have followed all the steps mentioned in there wiki (In Git repository).
I used bower to installed textAngular.
Folling are my code snippets
bower.json
{
"name": "Appname",
"version": "0.0.0",
"dependencies": {
"angular": "^1.3.0",
"json3": "^3.3.0",
"es5-shim": "^4.0.0",
"bootstrap": "^3.2.0",
"angular-animate": "^1.3.0",
"angular-aria": "^1.3.0",
"angular-cookies": "^1.3.0",
"angular-messages": "^1.3.0",
"angular-resource": "^1.3.0",
"angular-route": "^1.3.0",
"angular-sanitize": "^1.3.0",
"angular-touch": "^1.3.0",
"highcharts": "~4.0.4",
"bootstrap-calendar": "~0.2.4",
"smalot-bootstrap-datetimepicker": "~2.3.1",
"angular-datatables": "~0.3.0",
"components-font-awesome": "~4.3.0",
"angular-filter": "~0.5.1",
"datatables-responsive": "~1.0.2",
"datatables-colvis": "~1.1.1",
"textAngular": "~1.3.0",
"angularjs-dropdown-multiselect": "^1.5.2",
"lodash": "^3.5.0",
"angular-bootstrap-switch": "0.3.0",
"angular-toggle-switch": "~1.2.1",
"ngImgCrop": "~0.3.2",
"angular-file-upload": "~1.1.5"
},
"devDependencies": {
"angular-mocks": "~1.3.0",
"angular-scenario": "~1.3.0",
"rangy-core":"~1.2.3",
"rangy-saveselection":"~1.2.3"
},
"appPath": "app"
}
Index.html
CSS:
<link rel="stylesheet" href="bower_components/textAngular/src/textAngular.css" /
Scripts :
<script src="bower_components/rangy/rangy-core.min.js"></script>
<script src="bower_components/rangy/rangy-cssclassapplier.min.js"></script>
<script src="bower_components/rangy/rangy-selectionsaverestore.min.js"></script>
<script src="bower_components/rangy/rangy-serializer.min.js"></script>
<script src="bower_components/textAngular/src/textAngular.js"></script>
<script src="bower_components/textAngular/src/textAngularSetup.js"></script>
HTML code :
<div class="col-xs-12 col-sm-6 col-lg-6">
<text-angular ng-model="htmlVariable"></text-angular>
</div>
Please help me in finding what I am doing wrong
Regards
Mahesh
It my bad,
made mistake in application css
.btn-default{
width: 100%;
}
tool bar is using btn-defalt class

typeahead is not working in Angularjs

i write a small html code
<!DOCTYPE html(ng-app)><html><head><title>Express</title>
<link rel="stylesheet" href="/stylesheets/style.css"/>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js"></script>
<script src="/javascripts/ui-bootstrap-tpls-0.11.0.min.js"></script><script src="/javascripts/customjs.js"></script>
</head>
<body>
<h1>Weather Forecasting</h1>
<div ng-controller="TypeaheadCtrl"><form><input type="text" ng-model="selected" typeahead="state for state in states| filter:$viewValue | limitTo:8" class="form-control"/>
</form></div></body></html>
and customjs.js file code is
function TypeaheadCtrl($scope, $http) {
$scope.selected = undefined;
$scope.states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Dakota', 'North Carolina', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'];
// Any function returning a promise object can be used to load values asynchronously
}
but typeahead is not showing its autocomplete behaviour can anyone please tell why its not showing suggestions ??
Here is the example which is working Plunker Example using typeahead
You need to inject angular.module('sample', ['ui.bootstrap']); in customjs.js
as well in html you need to initiate angular application with some name as you want to use ui.bootstrap module in which typeahead is one of it.
<html ng-app="sample"><head><title>Express</title>
let me know if you still face the problem.

Snake Game: Why "(Sometimes, lower than 10%)" the snacks (cookies) are created on the snake body?

Here is my code snippet.
Filled_Func () is to sort my "non-snake-body" position in increase order. In other words, I use Filled[] to hold unfilled squares. :-)
Create_Cookie () is to choose the cookie position, get random value by time(), and draw cookie by calling Draw_Square ().
void Filled_Func (void)
{
int Cnt_X, Cnt_Y, Cnt_2, Cnt_3 = 0, Flag = 1;
for (Cnt_X = 0; Cnt_X < 25; Cnt_X++)
{
for (Cnt_Y = 0, Flag = 1; Cnt_Y < 25; Cnt_Y++)
{
for (Cnt_2 = 0 ; Cnt_2 < Move.Snake_Length; Cnt_2++)
{
if (Move.Position[Cnt_2].X == Cnt_X && Move.Position[Cnt_2].Y == Cnt_Y)
{
Flag = 0;
break;
}
}
if (Flag == 1)
{
Filled[Cnt_3].X = Cnt_X;
Filled[Cnt_3].Y = Cnt_Y;
Cnt_3++;
}
}
}
}
void Create_Cookie (HDC DeviceContext)
{
Filled_Func ();
int Rand = clock()%(625-Move.Snake_Length);
Cookie.X = Filled[Rand].X;
Cookie.Y = Filled[Rand].Y;
Draw_Square (Cookie.X, Cookie.Y, UP, RGB( 0 ,255, 0 ), -1, -1, UP, RGB(255,255,255), 0, DeviceContext);
}
My repository on Github.
My full C code in plain text (v1.00).
My full C code in plain text (v1.01). (I've changed Filled[] into Unfilled[])
Download executable and code.
Any help, suggestion, and advice will be very very appreciated. :-)
Added on NOV 30 AM 11:00 (GMT AM 3:00)
I trace the snake coordinate with outputing a log file:
Format: the snake coordinate --> the cookie coordinate
(12,12) (12,13) --> [17,06]
(17,06) (17,07) (17,08) --> [23,18]
(23,15) (23,16) (23,17) (23,18) --> [18,00]
(14,00) (15,00) (16,00) (17,00) (18,00) --> [22,14]
(17,14) (18,14) (19,14) (20,14) (21,14) (22,14) --> [04,06]
(04,06) (04,07) (05,07) (06,07) (07,07) (08,07) (09,07) --> [19,11]
(19,11) (20,11) (21,11) (22,11) (23,10) (23,11) (24,10) (24,11) --> [20,04]
(18,10) (19,10) (20,04) (20,05) (20,06) (20,07) (20,08) (20,09) (20,10) --> [16,18]
(09,19) (09,20) (10,19) (11,19) (12,19) (13,19) (14,19) (15,19) (16,18) (16,19) --> [19,07]
(19,07) (19,08) (19,09) (19,10) (19,11) (19,12) (20,08) (20,09) (20,10) (20,11) (20,12) --> [21,18]
(20,13) (20,14) (20,15) (20,16) (20,17) (20,18) (21,13) (21,14) (21,15) (21,16) (21,17) (21,18) --> [24,06]
(22,06) (22,07) (22,08) (22,09) (22,10) (22,11) (22,12) (22,13) (22,14) (22,15) (22,16) (23,06) (24,06) --> [18,15]
(17,04) (17,05) (17,06) (17,07) (17,08) (17,09) (17,10) (17,11) (17,12) (17,13) (17,14) (17,15) (18,04) (18,15) --> [00,18]
(00,15) (00,16) (00,17) (00,18) (17,12) (17,13) (17,14) (17,15) (18,15) (19,15) (20,15) (21,15) (22,15) (23,15) (24,15) --> [13,06]
(04,00) (05,00) (06,00) (07,00) (08,00) (09,00) (10,00) (11,00) (12,00) (13,00) (13,01) (13,02) (13,03) (13,04) (13,05) (13,06) --> [15,21]
(13,07) (13,08) (13,09) (13,10) (13,11) (13,12) (13,13) (13,14) (13,15) (13,16) (13,17) (13,18) (13,19) (13,20) (13,21) (14,21) (15,21) --> [18,13]
(13,21) (14,21) (15,21) (16,21) (17,21) (18,13) (18,21) (19,13) (19,21) (20,13) (20,14) (20,15) (20,16) (20,17) (20,18) (20,19) (20,20) (20,21) --> [24,18]
(12,16) (12,17) (12,18) (12,19) (12,20) (13,20) (14,20) (15,20) (16,20) (17,20) (18,20) (19,20) (20,20) (21,20) (22,20) (23,20) (24,18) (24,19) (24,20) --> [21,17]
(03,18) (04,18) (05,18) (06,18) (07,18) (08,18) (09,18) (10,18) (11,18) (12,18) (13,18) (14,18) (15,17) (15,18) (16,17) (17,17) (18,17) (19,17) (20,17) (21,17) --> [04,02]
(04,02) (05,02) (06,02) (07,02) (08,02) (09,02) (10,02) (11,02) (12,02) (13,02) (14,02) (15,02) (15,03) (15,04) (15,05) (15,06) (15,07) (15,08) (15,09) (15,10) (15,11) --> [19,01]
(17,01) (17,02) (17,03) (17,04) (17,05) (17,06) (17,07) (17,08) (17,09) (17,10) (17,11) (17,12) (17,13) (17,14) (17,15) (17,16) (17,17) (17,18) (17,19) (17,20) (18,01) (19,01) --> [08,17]
(02,01) (03,01) (04,01) (05,01) (06,01) (06,02) (06,03) (06,04) (06,05) (06,06) (06,07) (06,08) (06,09) (06,10) (06,11) (06,12) (06,13) (06,14) (06,15) (06,16) (06,17) (07,17) (08,17) --> [23,14]
(01,15) (02,15) (03,15) (04,15) (05,15) (06,15) (07,15) (08,15) (09,15) (10,15) (11,15) (12,15) (13,15) (14,15) (15,15) (16,15) (17,15) (18,15) (19,15) (20,15) (21,15) (22,15) (23,14) (23,15) --> [24,09]
(01,08) (02,08) (03,08) (04,08) (05,08) (06,08) (07,08) (08,08) (09,08) (10,08) (11,08) (12,08) (13,08) (14,08) (15,08) (16,08) (17,08) (18,08) (19,08) (20,08) (21,08) (22,08) (23,08) (24,08) (24,09) --> [24,10]
(01,08) (02,08) (03,08) (04,08) (05,08) (06,08) (07,08) (08,08) (09,08) (10,08) (11,08) (12,08) (13,08) (14,08) (15,08) (16,08) (17,08) (18,08) (19,08) (20,08) (21,08) (22,08) (23,08) (24,08) (24,09) (24,10) --> [00,01]
(00,01) (00,02) (01,02) (02,02) (03,02) (04,02) (05,02) (06,02) (07,02) (08,02) (09,02) (10,02) (11,02) (12,02) (13,02) (14,02) (15,02) (16,02) (17,02) (18,02) (19,02) (20,02) (21,02) (22,02) (23,02) (24,01) (24,02) --> [08,03]
(00,04) (00,05) (00,06) (00,07) (00,08) (00,09) (00,10) (01,04) (02,04) (03,04) (04,04) (05,04) (06,04) (07,04) (08,00) (08,01) (08,02) (08,03) (08,04) (08,23) (08,24) (09,00) (09,01) (09,02) (09,03) (09,04) (09,23) (09,24) --> [19,04]
(08,00) (08,01) (08,02) (08,03) (08,04) (08,05) (08,06) (08,07) (08,08) (08,09) (08,23) (08,24) (09,09) (09,23) (10,09) (11,09) (12,09) (13,09) (14,09) (15,09) (16,09) (17,09) (18,09) (19,04) (19,05) (19,06) (19,07) (19,08) (19,09) --> [24,09]
(13,09) (14,09) (15,09) (16,09) (17,09) (18,09) (19,00) (19,01) (19,02) (19,03) (19,04) (19,05) (19,06) (19,07) (19,08) (19,09) (20,00) (21,00) (22,00) (23,00) (24,00) (24,01) (24,02) (24,03) (24,04) (24,05) (24,06) (24,07) (24,08) (24,09) --> [16,01]
(14,01) (14,02) (14,03) (14,04) (14,05) (14,06) (14,07) (14,08) (14,09) (14,10) (14,11) (14,12) (14,13) (14,14) (15,01) (15,14) (16,01) (16,14) (17,14) (18,14) (19,14) (20,14) (21,14) (22,14) (23,14) (24,09) (24,10) (24,11) (24,12) (24,13) (24,14) --> [02,12]
(02,02) (02,03) (02,04) (02,05) (02,06) (02,07) (02,08) (02,09) (02,10) (02,11) (02,12) (03,02) (03,11) (03,12) (04,11) (04,12) (05,11) (05,12) (06,11) (06,12) (07,11) (07,12) (08,11) (08,12) (09,11) (09,12) (10,11) (10,12) (11,11) (11,12) (12,11) (12,12) --> [08,04]
(08,00) (08,01) (08,02) (08,03) (08,04) (08,23) (08,24) (09,23) (10,23) (11,23) (12,23) (13,23) (14,00) (14,01) (14,02) (14,03) (14,04) (14,05) (14,06) (14,07) (14,08) (14,09) (14,10) (14,11) (14,12) (14,23) (14,24) (15,12) (16,12) (17,12) (18,12) (19,12) (20,12) --> [24,17]
(08,00) (08,01) (08,02) (08,03) (08,04) (08,05) (08,06) (08,07) (08,08) (08,09) (08,10) (08,11) (08,12) (08,13) (08,14) (09,14) (10,14) (11,14) (12,14) (13,14) (14,14) (15,14) (16,14) (17,14) (18,14) (19,14) (20,14) (21,14) (22,14) (23,14) (24,14) (24,15) (24,16) (24,17) --> [12,05]
(10,04) (10,05) (10,06) (10,07) (10,08) (10,09) (11,04) (11,09) (12,04) (12,05) (12,09) (13,04) (13,05) (13,09) (14,04) (14,05) (14,09) (15,04) (15,05) (15,09) (16,04) (16,05) (16,09) (17,04) (17,05) (17,09) (18,09) (19,09) (19,10) (19,11) (19,12) (19,13) (19,14) (19,15) (19,16) --> [03,04]
(02,00) (02,01) (02,02) (02,03) (02,04) (02,05) (02,23) (02,24) (03,04) (03,05) (03,23) (04,00) (04,01) (04,02) (04,03) (04,04) (04,05) (04,23) (04,24) (05,04) (05,05) (06,04) (06,05) (07,04) (07,05) (08,04) (08,05) (09,05) (10,05) (11,05) --> [22,16]
(00,04) (01,04) (02,04) (03,04) (04,04) (05,04) (06,04) (06,05) (07,04) (07,05) (08,04) (08,05) (17,04) (17,05) (17,06) (17,07) (17,08) (17,09) (17,10) (17,11) (17,12) (17,13) (17,14) (17,15) (17,16) (18,04) (18,16) (19,04) (19,16) (20,04) (20,16) (21,04) (21,16) (22,04) (22,16) (23,04) (24,04) --> [24,17]
(04,16) (05,16) (06,16) (07,16) (08,16) (09,16) (10,16) (11,16) (12,16) (13,16) (14,16) (15,16) (16,16) (17,16) (18,16) (19,16) (20,16) (21,16) (22,16) (23,00) (23,16) (23,17) (23,18) (23,19) (23,20) (23,21) (23,22) (23,23) (23,24) (24,00) (24,17) (24,18) (24,19) (24,20) (24,21) (24,22) (24,23) (24,24) --> [18,09]
(05,09) (05,10) (06,09) (06,10) (07,09) (07,10) (08,09) (08,10) (09,09) (09,10) (10,09) (10,10) (11,09) (11,10) (12,09) (12,10) (13,09) (13,10) (14,09) (14,10) (15,09) (15,10) (16,09) (16,10) (17,09) (17,10) (18,09) (18,10) (19,10) (20,10) (20,11) (21,10) (21,11) (22,10) (22,11) (23,10) (23,11) (24,10) (24,11) --> [01,11]
(01,11) (01,12) (01,13) (01,14) (01,15) (01,16) (01,17) (01,18) (01,19) (01,20) (02,08) (02,09) (02,10) (02,11) (02,12) (02,13) (02,14) (02,15) (02,16) (02,17) (02,18) (02,19) (02,20) (03,08) (04,08) (05,08) (06,08) (07,08) (08,08) (09,08) (10,08) (11,08) (12,08) (13,08) (14,08) (15,08) (16,08) (17,08) (18,08) (19,08) --> [14,01]
(01,09) (01,10) (02,09) (03,09) (04,09) (05,09) (06,09) (07,09) (08,09) (09,09) (10,09) (11,09) (12,09) (13,00) (13,01) (13,02) (13,03) (13,04) (13,05) (13,06) (13,07) (13,08) (13,09) (14,00) (14,01) (15,00) (15,01) (16,00) (16,01) (17,00) (17,01) (18,00) (18,01) (19,00) (19,01) (20,00) (20,01) (21,00) (21,01) (22,00) (22,01) --> [24,01]
(07,01) (07,02) (07,03) (08,01) (08,03) (09,01) (09,03) (10,01) (10,03) (11,01) (11,03) (12,01) (12,03) (13,01) (13,03) (14,01) (14,03) (15,01) (15,03) (16,01) (16,03) (17,01) (17,03) (18,00) (18,01) (18,03) (19,00) (19,01) (19,03) (20,00) (20,01) (20,03) (21,00) (21,01) (21,03) (22,00) (22,01) (22,03) (23,03) (24,01) (24,02) (24,03) --> [23,18]
(09,03) (10,03) (11,03) (12,03) (13,03) (14,03) (15,03) (15,20) (15,21) (16,03) (16,20) (16,21) (17,03) (17,20) (17,21) (18,03) (18,20) (18,21) (19,03) (19,20) (19,21) (20,03) (20,20) (20,21) (21,03) (21,20) (21,21) (22,03) (22,20) (22,21) (23,03) (23,18) (23,19) (23,20) (23,21) (24,00) (24,01) (24,02) (24,03) (24,21) (24,22) (24,23) (24,24) --> [05,18]
(05,12) (05,13) (05,14) (05,15) (05,16) (05,17) (05,18) (06,12) (07,12) (08,12) (09,12) (10,12) (11,12) (12,12) (13,12) (14,12) (15,12) (15,20) (15,21) (16,12) (16,20) (16,21) (17,12) (17,20) (17,21) (18,12) (18,20) (19,12) (19,20) (20,12) (20,20) (21,12) (21,20) (22,12) (22,20) (23,12) (23,13) (23,14) (23,15) (23,16) (23,17) (23,18) (23,19) (23,20) --> [23,06]
(00,05) (00,06) (01,05) (01,06) (10,19) (11,19) (12,19) (13,19) (14,19) (15,19) (16,19) (17,19) (18,10) (18,11) (18,12) (18,13) (18,14) (18,15) (18,16) (18,17) (18,18) (18,19) (19,10) (20,04) (20,05) (20,10) (21,04) (21,05) (21,10) (22,04) (22,05) (22,10) (23,04) (23,05) (23,06) (23,10) (24,04) (24,05) (24,06) (24,07) (24,08) (24,09) (24,10) --> [06,07]
(00,06) (01,06) (06,07) (06,08) (06,09) (06,10) (06,11) (06,12) (06,13) (06,14) (06,15) (06,16) (06,17) (06,18) (06,19) (07,06) (07,07) (07,08) (07,09) (07,10) (07,11) (07,12) (07,13) (07,14) (07,15) (07,16) (07,17) (07,18) (07,19) (08,06) (09,06) (10,06) (11,06) (12,06) (13,06) (14,06) (15,06) (16,06) (17,06) (18,06) (19,06) (20,06) (21,06) (22,06) (23,06) (24,06) --> [14,07]
(06,05) (06,06) (06,07) (06,08) (06,09) (06,10) (06,11) (06,12) (06,13) (06,14) (06,15) (06,16) (06,17) (06,18) (06,19) (07,05) (07,06) (07,07) (07,08) (07,09) (07,10) (07,11) (07,12) (07,13) (07,14) (07,15) (07,16) (07,17) (07,18) (07,19) (08,05) (08,06) (09,05) (09,06) (10,05) (10,06) (11,05) (11,06) (12,05) (12,06) (13,05) (13,06) (14,05) (14,06) (14,07) (15,06) --> [18,20]
(06,05) (06,06) (06,07) (07,05) (08,05) (09,05) (10,05) (11,05) (12,05) (13,05) (14,05) (14,06) (14,07) (14,08) (14,09) (14,10) (14,11) (14,12) (14,13) (14,14) (14,15) (14,16) (14,17) (14,18) (14,19) (15,19) (16,19) (17,19) (18,19) (18,20) (18,21) (18,22) (18,23) (19,19) (19,23) (20,19) (20,23) (21,19) (21,23) (22,19) (22,23) (23,19) (23,23) (24,19) (24,20) (24,21) (24,22) (24,23) --> [23,20]
(14,17) (14,18) (14,19) (15,19) (16,19) (17,19) (18,14) (18,15) (18,16) (18,17) (18,18) (18,19) (18,20) (18,21) (18,22) (18,23) (19,14) (19,19) (19,23) (20,14) (20,19) (20,23) (21,14) (21,19) (21,23) (22,14) (22,19) (22,23) (23,14) (23,19) (23,20) (23,21) (23,22) (23,23) (24,14) (24,15) (24,16) (24,17) (24,18) (24,19) (24,20) (24,21) (24,22) (24,23) --> [08,24]
(07,12) (07,13) (07,14) (07,15) (07,16) (07,17) (07,18) (07,19) (07,20) (07,21) (07,22) (07,23) (07,24) (08,12) (08,24) (09,12) (10,12) (11,12) (12,12) (13,12) (14,12) (15,12) (16,12) (17,12) (18,12) (19,12) (20,12) (21,12) (22,12) (23,12) (23,13) (23,14) (23,15) (23,16) (23,17) (23,18) (23,19) (23,20) (23,21) (23,22) (24,14) (24,15) (24,16) (24,17) (24,18) (24,19) (24,20) (24,21) (24,22) --> [01,03]
(01,03) (01,04) (02,04) (03,04) (04,04) (05,04) (06,04) (07,04) (07,12) (07,13) (07,14) (07,15) (07,16) (07,17) (07,18) (07,19) (07,20) (07,21) (07,22) (07,23) (07,24) (08,04) (08,12) (08,24) (09,04) (09,12) (09,24) (10,04) (10,12) (10,24) (11,04) (11,12) (11,24) (12,04) (12,24) (13,04) (13,24) (14,04) (14,24) (15,04) (15,24) (16,04) (16,24) (17,04) (17,24) (18,00) (18,01) (18,02) (18,03) (18,04) (18,24) --> [15,03]
(01,00) (01,01) (01,02) (01,03) (01,04) (01,11) (01,12) (01,13) (01,14) (01,15) (01,16) (01,17) (01,18) (01,19) (01,20) (01,21) (01,22) (01,23) (01,24) (02,04) (02,11) (03,04) (03,11) (04,04) (04,11) (05,04) (05,11) (06,04) (06,11) (07,04) (07,11) (08,04) (08,11) (09,04) (09,11) (10,04) (10,11) (11,04) (11,11) (12,04) (12,11) (13,11) (14,11) (15,03) (15,04) (15,05) (15,06) (15,07) (15,08) (15,09) (15,10) (15,11) --> [13,10]
(01,11) (01,12) (01,13) (01,14) (01,15) (01,16) (01,17) (01,18) (01,19) (01,20) (01,21) (02,11) (03,11) (04,11) (05,11) (06,11) (07,11) (08,11) (09,11) (10,11) (11,11) (12,11) (13,10) (13,11) (14,10) (14,11) (15,00) (15,01) (15,02) (15,03) (15,04) (15,05) (15,06) (15,07) (15,08) (15,09) (15,10) (15,11) (15,12) (15,13) (15,14) (15,15) (15,16) (15,17) (15,18) (15,19) (15,20) (15,21) (15,22) (15,23) (15,24) --> [17,09]
(06,09) (06,10) (07,09) (07,10) (08,09) (08,10) (09,09) (09,10) (09,11) (10,09) (10,10) (10,11) (11,09) (11,10) (11,11) (12,09) (12,10) (12,11) (13,09) (13,10) (13,11) (14,09) (14,10) (14,11) (15,00) (15,01) (15,02) (15,03) (15,04) (15,05) (15,06) (15,07) (15,08) (15,09) (15,10) (15,11) (15,12) (15,13) (15,14) (15,15) (15,16) (15,17) (15,18) (15,19) (15,20) (15,21) (15,22) (15,23) (15,24) (16,09) (17,09) --> [18,19]
(12,13) (12,14) (12,15) (12,16) (12,17) (12,18) (13,13) (13,18) (14,10) (14,11) (14,12) (14,13) (14,14) (14,15) (14,16) (14,17) (14,18) (14,19) (14,20) (15,10) (15,13) (15,18) (15,20) (16,10) (16,13) (16,18) (16,20) (17,10) (17,13) (17,18) (17,20) (18,10) (18,13) (18,18) (18,19) (18,20) (19,10) (19,13) (19,14) (19,15) (19,16) (19,17) (19,18) (19,19) (19,20) (20,09) (20,10) (21,09) (21,10) (22,09) (22,10) --> [04,09]
(04,09) (04,10) (04,11) (04,12) (04,13) (04,14) (04,15) (04,16) (04,17) (04,18) (04,19) (05,19) (06,19) (07,19) (08,19) (09,19) (10,19) (11,19) (12,13) (12,14) (12,15) (12,16) (12,17) (12,18) (12,19) (13,13) (13,18) (13,19) (14,13) (14,18) (14,19) (15,13) (15,18) (15,19) (16,13) (16,18) (16,19) (16,20) (17,13) (17,18) (17,19) (17,20) (18,13) (18,18) (18,19) (18,20) (19,13) (19,14) (19,15) (19,16) (19,17) (19,18) (19,19) (19,20) --> [01,13]
(01,11) (01,12) (01,13) (02,11) (03,11) (04,09) (04,10) (04,11) (04,12) (04,13) (04,14) (04,15) (04,16) (04,17) (04,18) (04,19) (05,09) (05,11) (05,19) (06,09) (06,11) (06,19) (07,09) (07,11) (07,19) (08,09) (08,11) (08,19) (09,09) (09,11) (09,19) (10,09) (10,10) (10,11) (10,19) (11,19) (12,14) (12,15) (12,16) (12,17) (12,18) (12,19) (13,18) (13,19) (14,18) (14,19) (15,18) (15,19) (16,18) (16,19) (17,18) (17,19) (18,18) (18,19) (19,18) (19,19) --> [11,06]
(01,11) (01,12) (01,13) (01,14) (01,15) (01,16) (01,17) (01,18) (01,19) (02,11) (02,19) (03,11) (03,19) (04,11) (04,19) (05,11) (05,19) (06,11) (06,19) (07,11) (07,19) (08,11) (08,19) (09,09) (09,11) (09,19) (10,05) (10,06) (10,07) (10,08) (10,09) (10,10) (10,11) (10,12) (10,13) (10,14) (10,15) (10,16) (10,17) (10,18) (10,19) (11,05) (11,06) (12,05) (12,06) (13,05) (13,06) (14,05) (14,06) (15,05) (15,06) (16,05) (16,06) (17,05) (17,06) --> [24,11]
(06,19) (07,06) (07,07) (07,19) (08,06) (08,07) (08,19) (09,06) (09,07) (09,19) (10,05) (10,06) (10,07) (10,08) (10,09) (10,10) (10,11) (10,12) (10,13) (10,14) (10,15) (10,16) (10,17) (10,18) (10,19) (11,05) (11,06) (11,07) (12,05) (12,06) (12,07) (13,05) (13,06) (13,07) (14,05) (14,06) (14,07) (15,05) (15,06) (15,07) (16,05) (16,06) (16,07) (17,05) (17,06) (17,07) (18,07) (19,07) (20,07) (21,07) (22,07) (23,07) (24,07) (24,08) (24,09) (24,10) (24,11) --> [04,01]
(00,00) (00,01) (01,00) (01,01) (02,00) (02,01) (03,00) (03,01) (04,00) (04,01) (05,00) (05,01) (05,02) (05,03) (05,04) (05,05) (05,06) (05,07) (05,08) (05,09) (05,10) (05,11) (05,12) (05,13) (05,14) (05,15) (05,16) (05,17) (05,18) (05,19) (05,20) (05,21) (05,22) (05,23) (05,24) (06,05) (07,05) (08,05) (09,05) (10,05) (11,05) (12,05) (13,05) (14,05) (15,05) (16,05) (16,06) (16,07) (16,08) (16,09) (23,00) (23,01) (24,00) (24,01) --> [24,12]
(00,00) (00,01) (00,11) (00,13) (01,00) (01,01) (01,11) (01,13) (02,00) (02,01) (02,11) (02,13) (03,01) (03,11) (03,13) (04,01) (04,11) (04,13) (05,01) (05,11) (05,13) (06,01) (06,11) (06,13) (07,01) (07,11) (07,12) (07,13) (08,01) (09,01) (10,01) (11,01) (12,01) (13,01) (14,01) (15,01) (16,01) (17,01) (18,01) (19,01) (20,01) (21,01) (22,01) ****(23,00)**** (23,01) (23,02) (23,03) (23,04) (23,05) (23,06) (23,07) (23,08) (23,09) (23,10) (23,11) (24,00) (24,01) (24,11) (24,12) (24,13) --> [23,00]
See the last line, where bug happens: The snack (cookie) was created at (23,00), but (23,00) was already occupied by the snake !!!
Why? Could anyone help me? Any help, suggestion, and advice will be very very appreciated. :-)
Without actually reading the code in details: you seem to fill a Filled[index] tab with ONLY unfilled coordinates. Then you choose one of them at random.
In that case, I expect to see, at the place where you test if a coordinate is occupied by the snake, some longer instructions than just having "Flag=0". You need to make sure you "shift" remaining Filled[index] so that only unfilled coordinates remains in that array! (think : linked-lists, and deletion of one as it now becomes "filled" by the snake)
#Olivier Dulac
I've updated my code on Github ( Plain Text ).
It works fine now. :-)
Solution
void Unfilled_Func (void)
{
int Cnt_X, Cnt_Y, Cnt_2, Cnt_3 = 0, Flag = 1;
for (Cnt_X = 0; Cnt_X < 25; Cnt_X++)
{
for (Cnt_Y = 0; Cnt_Y < 25; Cnt_Y++)
{
Flag = 1;
for (Cnt_2 = 0 ; Cnt_2 < Move.Snake_Length; Cnt_2++)
{
if (Move.Position[Cnt_2].X == Cnt_X && Move.Position[Cnt_2].Y == Cnt_Y)
{
Flag = 0;
break;
}
}
if (Flag == 1)
{
Unfilled[Cnt_3].X = Cnt_X;
Unfilled[Cnt_3].Y = Cnt_Y;
Cnt_3++;
}
}
}
Unfilled_Length = Cnt_3;
}
void Create_Cookie (HDC DeviceContext)
{
Unfilled_Func ();
int Rand = clock()%Unfilled_Length;
Cookie.X = Unfilled[Rand].X;
Cookie.Y = Unfilled[Rand].Y;
Draw_Square (Cookie.X, Cookie.Y, UP, RGB( 0 ,255, 0 ), -1, -1, UP, RGB(255,255,255), 0, DeviceContext);
}

Resources